How do you destroy an actor only when it collides at a certain velocity?
AtomicFX
Member Posts: 23
Hi everyone, I'm trying to figure out how to destroy an actor when it collides with a wall but only at a certain velocity. If it doesn't reach that minimum velocity it just collides but doesn't get destroyed. Thanks!
Comments
actor collides with wall
rule
when actor overlaps or collides with wall
when attribute self.motion.linear velocity x is > 400
destroy actor
change the 400 to whatever value you want and the liner velocity to x or y depending on direction.
Fortuna Infortuna Forti Una
Thanks for the reply but I am currently using Accelerate to move my actor and the actor's velocity doesn't seem to be affected by it. I'd like to keep using it as it makes the movement more realistic (the movement is of the actor falling). Any other way?
Same concept, just remember since the object is going down its going in a negative number. so instead do self.motion y < -400 destroy otherwise collide
Fortuna Infortuna Forti Una
That worked great! I didn't realize since it's dropping it's actually a negative number. Thanks!!
No problem.
Fortuna Infortuna Forti Una
No problem.
Fortuna Infortuna Forti Una