Why wont self.physics.movable let me change mid game?
QuestionMan
Member Posts: 81
K so I've done some testing, I know I must be missing something really simple here. I have an object that if I have the 'movable' field checked, when I preview it, the object slowly falls to the floor because of gravity. I also have a button, when I click it, it propels that object at an upward angle.
The problem is the gravity isn't supposed to be triggered (at least on that object) until after I click the button.
To solve this, I'm assuming the 'movable' field has to be unchecked, and when the button is clicked, have self.physics.movable changed to 'true'
I did this with 'change attribute', and it wont move at all now. It doesnt seem to recognize the change attribute for self.physics.movable.
Any ideas?
The problem is the gravity isn't supposed to be triggered (at least on that object) until after I click the button.
To solve this, I'm assuming the 'movable' field has to be unchecked, and when the button is clicked, have self.physics.movable changed to 'true'
I did this with 'change attribute', and it wont move at all now. It doesnt seem to recognize the change attribute for self.physics.movable.
Any ideas?
Comments
You could constrain the velocity to 0 until gravity is triggered maybe?
as well as move left, rotate clockwise and rotate counter clockwise.
they all obey my button pressing.
i set all of the above(buttons and platform) self.physics.moveable to false(uncheck).
i am dropping a ball onto platform. and make it collide/bounce with the platform.
however, now i cant control my platform. it just sits there.
can I momentairly toggle self.physics.moveable to true, do my button movement control the set the self.physics.moveable to false?
Make two identical platforms, one with self.physics.moveable set to false and one with self.physics.moveable to true.
When you want to swap between them, destroy one platform at the same time as spawning the other.
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS