Velocity question
fliperama
Member Posts: 6
I am making a game with objects like marbles. The balls collide and must stop.
But eventually they do not stop, keeping a small motion.
I created a rule to avoid that.
actor's details:
Drag: 150
Drag Angle: 5
Collision Shape: Circle
density 100
Friction: 10
Restitution: 1
------------------------
When all conditions are valid:
attribute - self.linear velocity x >= -10 and <0
change attribute - self.linear velocity x to 0
When all conditions are valid
attribute - self.linear velocity x <10 and >= 0
change attribute - self.linear velocity x to 0
------------------------
I did the same for "self.linear velocity y" and "self.angular velocity" but the balls still maintaining a slight movement.
I put a Display Text When a key is pressed and observed linear velocity x and y keeps ranging from:-4.XXXXXX / 4.XXXXXX.
Sometimes the variation reaches 9 / -9, and reaches 15, 20 decimal.
The question is: The requirements of the rules being followed, but the actor does not follow the rule.
How do I complete stop an actor?
Sorry for the English, do not blame me, blame google translator.
But eventually they do not stop, keeping a small motion.
I created a rule to avoid that.
actor's details:
Drag: 150
Drag Angle: 5
Collision Shape: Circle
density 100
Friction: 10
Restitution: 1
------------------------
When all conditions are valid:
attribute - self.linear velocity x >= -10 and <0
change attribute - self.linear velocity x to 0
When all conditions are valid
attribute - self.linear velocity x <10 and >= 0
change attribute - self.linear velocity x to 0
------------------------
I did the same for "self.linear velocity y" and "self.angular velocity" but the balls still maintaining a slight movement.
I put a Display Text When a key is pressed and observed linear velocity x and y keeps ranging from:-4.XXXXXX / 4.XXXXXX.
Sometimes the variation reaches 9 / -9, and reaches 15, 20 decimal.
The question is: The requirements of the rules being followed, but the actor does not follow the rule.
How do I complete stop an actor?
Sorry for the English, do not blame me, blame google translator.