Collisions

Blitz3D Forums/Blitz3D Programming/Collisions

Brendane(Posted 2003) [#1]
Hello guys, I have some queries regarding the collision system.

Is there a way to set up a collisions statement which allows my collisions to be registered and yet not affect the movement of my entities? I want to be able to detect a collision, but I don't want to object to stop.

Also - I want to be able to remove a collisions statement without clearing all of the collisions setup - is this possible?


jhocking(Posted 2003) [#2]
The first question is one which used to keep me up at nights. There is no built-in way but there are a number of simple workarounds to accomplish that. Depending on your needs you could simply use EntityDistance to detect when entities have gotten close enough to touch or, for something more accurate but also more complicated, you can look in the 3D Graphics section of the Code Archives for No Response Collisions (in that code sample there is a pivot attached to the entity which is detecting collision; thus the entity itself is not affected by the collision.)

As for the second question, I'm not exactly sure what you are referring to but taking a guess I think you mean you want to turn off collision detection for certain objects. In that case simply change the EntityType of the objects.


Brendane(Posted 2003) [#3]
Thanks Joe,

I have been browsing the forum in the meantime and think I can get away with doing the collision test myself with a Linepick followed by an entity distance just like you said.

As for disabling the collision tests, yes - that solution came to me just a few moments ago :) Thanks.

I have posted a feature request for the collisions statement - to have a fourth option to do nothing but register the collisions... well, you can but try :)

Thanks again.