Author Topic: Can Raycasting be turned off on static-shapes?  (Read 2400 times)

I'm using static shapes to get better collision on some bricks.  Can I turn raycasting off on the static shapes so they can mirror the functionality of bricks?

Right now I'm just "hiding" the static shape when raycasting is turned off on the brick.  But that's not the best solution as it turns off regular collision of the static shape at the same time.

You can turn off collision without turning off raycasting by switching to a datablock that has LOSCol instead of Col.

I can't recall a nice way of going the opposite (col without rays), but you could always switch to a datablock that has concave collision: players and vehicles should collide okay, but raycasts don't.

https://github.com/portify/io_scene_dts/blob/master/FAQ.md#why-are-my-collision-meshes-stopping-players-but-not-raycasts-and-projectiles

That's definitely a bit of a hack though, and I can't guarantee it'll work very well.

You can turn off collision without turning off raycasting by switching to a datablock that has LOSCol instead of Col.

I can't recall a nice way of going the opposite (col without rays), but you could always switch to a datablock that has concave collision: players and vehicles should collide okay, but raycasts don't.

https://github.com/portify/io_scene_dts/blob/master/FAQ.md#why-are-my-collision-meshes-stopping-players-but-not-raycasts-and-projectiles

That's definitely a bit of a hack though, and I can't guarantee it'll work very well.
concave collision will not work with vehicles.

I tried making a collision shape with an empty LOSCol layer to make it lose raycasting.  That didn't work.
But then I tried just making a cube w/detail32 and LOSCol layers.  And that didn't work either.  No raycasting.
So I haven't been able to export an object on the LOSCol layer that the game recognizes.
   Its definitely recognizes it as a layer in general, as the LOSCol object affects the bounding box.  But it doesn't give that object any raycasting properties.
I tried naming the layer "LOSCol", "LOSCollision-1", "LOSCol-1", and "LOSCollision1".  None of them worked.
I tried exporting the object with the old 2.49b exporter, but that didn't make any difference.

Does Blockland even use the LOSCol layer?  Am I right in assuming a LOSCol layer affects raycasting and projectile collision?  What's LOSCol even for?  I don't see it mentioned much anywhere.

LOSCol is collision but only for raycasts. Are you putting the mesh in the right detail level?

you need to name it LOSCol-9

LOSCol is collision but only for raycasts. Are you putting the mesh in the right detail level?
When I check blender's console it says "Exporting mesh 'Cube' (LOD 'LOSCollision-1')"
I get similar results for all of the different names I've given the LOD layer.

you need to name it LOSCol-9
I tried exporting on LOD layer LOSCol-9 and LOSCollision-9.  Neither worked.

If I name the object "LOSCol-9", port's exporter automatically puts it on LOD layer "Collision-1", and the object has regular collision in addition to raycasting.


I tried using the old exporter and putting a LOSCol object in Blockland v16.
It didn't work there either.

I also tried port's idea of using concave collision.  Vehicles go right through.  Players collide.  Projectiles collide.  Raycasting stuff (such as activatestuff) goes right through.
« Last Edit: March 22, 2017, 04:21:49 PM by Tendon »

When I check blender's console it says "Exporting mesh 'Cube' (LOD 'LOSCollision-1')"

"Cube"? You need to name the mesh itself "LOSCol-N" (where N is a number in a range I don't remember, but 9 should be valid)

If I name the object "LOSCol-9", port's exporter automatically puts it on LOD layer "Collision-1", and the object has regular collision in addition to raycasting.

It isn't actually supposed to do this, but you should be able to specify the name and the LOD manually.

It isn't actually supposed to do this, but you should be able to specify the name and the LOD manually.
I have been setting the LOD name manually.

also vehicles rely on raycasting for collision
ah crap I forgot about that.  that makes this entire topic kinda pointless for what I'm doing.

oh well.

LOSCol doesn't seem to do- anything, in Blockland.  It's good to know I can ignore that from now on.
« Last Edit: March 22, 2017, 07:33:07 PM by Tendon »

if you want to create a collision mesh that only interacts with players and not raycasts
youll have to exploit glitches

this is how I do it, make a collision shape like this


then duplicate it and rotate it so it creates the cube shape



this L shape will not collide with raycasts but will collide with players
also vehicles rely on raycasting for collision, if you turn off raycasting on bricks vehicles will also go through them

@Swollow that's what I meant by concave.

I have been setting the LOD name manually.

Yes, but you need to set the mesh name too.

@Swollow that's what I meant by concave.
I am aware, I was just explaining in my opinion the best way to make concave collision

I am pretty sure that you are Swollow, not Aware

I am pretty sure that you are Swollow, not Aware
I'm going to beat you in the most loving manner

Wait, you can have multiple collision boxes?
Is it possible to do this on vehicles?

Wait, you can have multiple collision boxes?
Is it possible to do this on vehicles?
yes
i think