Object.isFixedRotation doesn't work!

The objects still rotates, anyone had this issue before? After colliding with something, my object still rotates… [import]uid: 59735 topic_id: 35781 reply_id: 335781[/import]

Hi @BoltVisual,
Can you post the code where you set up your entire physics body and its parameters?

Thanks,
Brent [import]uid: 200026 topic_id: 35781 reply_id: 142335[/import]

@Bolt, I had the same problem, and the issue was that I was putting the rotation value BEFORE I added the physics body to the object. If you move it to a line after the physics is added, you should be good to go. [import]uid: 135394 topic_id: 35781 reply_id: 142387[/import]

Hi @BoltVisual,
Can you post the code where you set up your entire physics body and its parameters?

Thanks,
Brent [import]uid: 200026 topic_id: 35781 reply_id: 142335[/import]

@Bolt, I had the same problem, and the issue was that I was putting the rotation value BEFORE I added the physics body to the object. If you move it to a line after the physics is added, you should be good to go. [import]uid: 135394 topic_id: 35781 reply_id: 142387[/import]

I am having the same problem.  And I definitely have the rotation value set after I addBody.  Here’s my code:

[lua]physics.addBody(player, { density = 1.0, friction = 0.3, bounce = 0.4 })
player.IsFixedRotation = true[/lua]

In my case, player is a sprite, if that makes any difference.  And, I am using the latest daily build (1100).

Hi Michael,

You’ve spelled the property wrong. It’s “isFixedRotation” (initial lowercase “i”). Remember that all Corona properties and functions are case-sensitive.

Brent

If the above is a direct snippet, the i in IsFixedRotation should not be capitalized. 

Sorry for being an idiot, but glad it was an easy fix.  Thanks!  It works fine now, of course!

I am having the same problem.  And I definitely have the rotation value set after I addBody.  Here’s my code:

[lua]physics.addBody(player, { density = 1.0, friction = 0.3, bounce = 0.4 })
player.IsFixedRotation = true[/lua]

In my case, player is a sprite, if that makes any difference.  And, I am using the latest daily build (1100).

Hi Michael,

You’ve spelled the property wrong. It’s “isFixedRotation” (initial lowercase “i”). Remember that all Corona properties and functions are case-sensitive.

Brent

If the above is a direct snippet, the i in IsFixedRotation should not be capitalized. 

Sorry for being an idiot, but glad it was an easy fix.  Thanks!  It works fine now, of course!