If collided, do nothing?

Blitz3D Forums/Blitz3D Beginners Area/If collided, do nothing?

BLaBZ(Posted 2009) [#1]
I want to check to see if my 2 entities have collided but I don't want them to stop or slide

Ideas?


Ross C(Posted 2009) [#2]
You can use a distance check, if your doing sphere to sphere.

If you want any other kind of blitz collision, parent a pivot to the moving object (the sphere part of the "sphere to polygon" collision). Set the collision for the pivot, rather than the player. The pivot will collide and respond, but the player will keep moving. You will of course need to reset the position of the pivot afterwards :)


BLaBZ(Posted 2009) [#3]
Good idea =D

Thought I could also create my own type of collision function by measuring the mesh width, height, and depth..


Warner(Posted 2009) [#4]
I suppose that would be faster then using collisions. Here is a code archive entry that uses the technique Ross C describes:
http://www.blitzbasic.com/codearcs/codearcs.php?code=540


jfk EO-11110(Posted 2009) [#5]
One method that is relative easy is:

Move the entities
Store their new position in some variables
UpdateWorld()
Check if Collision occured
hide the entities (this resets the collision table, ResetEntity may work as well)
Position the entities at the previously stored positions
Show entities
Continue as usual