detect when character is stopped when movement is constrained
RossmanBrothersGames
Member Posts: 659
hey everyone, wondering if somebody may have a solution to a problem.
I have a platformer where the character is always moving, so I have their linear velocity x constrained so that they keep moving smoothly after bumping into something for a moment.
I also have an actor for animations constrained over the main actor.
My problem is the animation actor needs to know when the main actor is stopped behind a wall or object so that it knows to animate appropriately. Problem is even when the character is stopped the constraint keeps the linear velocity x as if the character is moving.
I made a boleen attribute called stopped that I want the to switch true when the character is stopped
but the rule "when linearvelocityx = 0" won't work as it never actually does equal 0,
any other thoughts on how to tell if the actor is moving, or the screen is scrolling or anything like that?
any help very appreciated!
I have a platformer where the character is always moving, so I have their linear velocity x constrained so that they keep moving smoothly after bumping into something for a moment.
I also have an actor for animations constrained over the main actor.
My problem is the animation actor needs to know when the main actor is stopped behind a wall or object so that it knows to animate appropriately. Problem is even when the character is stopped the constraint keeps the linear velocity x as if the character is moving.
I made a boleen attribute called stopped that I want the to switch true when the character is stopped
but the rule "when linearvelocityx = 0" won't work as it never actually does equal 0,
any other thoughts on how to tell if the actor is moving, or the screen is scrolling or anything like that?
any help very appreciated!
Comments
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
www.rossmanbrosgames.com
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
www.rossmanbrosgames.com
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User