Collisions

Blitz3D Forums/Blitz3D Beginners Area/Collisions

Terry B.(Posted 2007) [#1]
I am making a fps where you have a bow and your in a castle. I started coding my AI. There is a cube that comes at you. Now you SHOULD be able to shoot it with an arrow, and it should die(I have all the collisions set up). But, when you shoot arrows at it, it goes right through. Now heres the weird part, if you shoot an arrow at the ground, and the cube "walks" over it, it dies. Anyone know whats going on?


Matty(Posted 2007) [#2]
It is difficult to know 'whats going on' (or give assistance) without some code to look at.


Sledge(Posted 2007) [#3]
Nah it's not. Sounds like he's trying to get collisions between two moving objects working - for which I suggest using the forum search as it's been brought up a few times.


puki(Posted 2007) [#4]
"Terry Bull" - remember that even when the arrow is stationary, in your code you may still be checking for a collision - ie, you probably have left your collisions active for the arrow the whole time (even after it has landed/stopped).

Doing the collisions between the two (arrow and target) are not always as easy as they sound - the arrow can pass through the cube/target prior to 'Blitz collisions' detecting it. It's somewhat of an art. So, to get this working correctly, you will probably have to mess about a bit.

Personally, I don't do these types of collisions - I always simulate the results.


Zethrax(Posted 2007) [#5]
Make sure all moving and animating entities are set up as collision source ellipsoids in the collision system, or have a static, non-moving collision mesh or box surrounding them. Collisions won't register against meshes that are moving towards whatever they should be colliding with.