Pushing Physics Object

Is there a way to some physics object when push another object to be always in a straight line? No matter where the sprite is pushing?

What’s happening: 

1) 

fe1d0o.jpg

2) 

szafqd.jpg

I do not want that rect to move that direction… i want always to be in a straight line, you know? Is it possible?

Hi @Ziad.Ali,

Yes, you can easily prevent the box from tipping/rotating by setting the following property on it:

[lua]

.isFixedRotation = true

[/lua]

Remember to state this property after you make the object into a physics object. If you state this property before, it will not be recognized as pertaining to the physics engine.

Take care,

Brent

Thank you @Brent Sorrentino!! Worked great.

Hi @Ziad.Ali,

Yes, you can easily prevent the box from tipping/rotating by setting the following property on it:

[lua]

.isFixedRotation = true

[/lua]

Remember to state this property after you make the object into a physics object. If you state this property before, it will not be recognized as pertaining to the physics engine.

Take care,

Brent

Thank you @Brent Sorrentino!! Worked great.