Collide Detection Problem
creativeapps
Member Posts: 1,770
I want to password one car inside the tube but I want to collide car with yellow area ( outside of the tube in yellow border )
And I want to pass car when its going into tunnel. I do not want to use hide objects for collision. Is there any way to calculate x and y for tube collision? How to do that? Please let me know.
And I want to pass car when its going into tunnel. I do not want to use hide objects for collision. Is there any way to calculate x and y for tube collision? How to do that? Please let me know.
Comments
hope that helps.
kipper
You could use interpolate functions when it collides to get it "through"
When car overlaps/collides with pipe;
Interpolate self.position.X to self.position.X+100 (or however long the pipe is).
To make it appear that the car is going "through" and not over, use two actors, one behind the car and one in front of the car, that way it appears it goes into the pipe and through it.
Hope that helps.
Good luck!
So if your tube is say 10 units high and your tube's y position is say something like 50. The top edge's y position would be 55, the bottom edge would be 45.
If you want to bound that in a rule you would say anything greater than 45 and anything less than 55, do this. That should give you a bounding area inside the tube. You would have to add something for the X value too, I reckon.