Make an actor movable only sometimes
Hachiko
Member Posts: 330
Ok, I have a little problem, hope you can help me.
I have an actor that fall from above. When it lands onto a platform, the actor goes up and the platform slide to the right.
Problem is, when the actor and the platform collide, the platform sink a bit.
With a costrain attribute = self.position.y to given coordinate, the problem is solved, but the constrain attribute isn't really an FPS helper, and I have 4-5 platform onto screen at a time.
Isn't there a best way to achieve the same result?
Deleting the collide isn't possible, cause like that the jump isn't always of the same height.
I have an actor that fall from above. When it lands onto a platform, the actor goes up and the platform slide to the right.
Problem is, when the actor and the platform collide, the platform sink a bit.
With a costrain attribute = self.position.y to given coordinate, the problem is solved, but the constrain attribute isn't really an FPS helper, and I have 4-5 platform onto screen at a time.
Isn't there a best way to achieve the same result?
Deleting the collide isn't possible, cause like that the jump isn't always of the same height.
Comments
maybe also give the platform a restitution of 0 so it has no bounce?
This will make the platform fixed, but it puts the responsibility on you to move it by manually tweaking the x and y position.
(You may also want to turn on Fixed Rotation under Physics, but then you are responsible for calculating it's rotation, if any)
For the interpolation thing, I really don't know that behaviour much. What's the difference between it and the constrain one?
It seems I can't publish. It stuck on the upload thing and then says that too much time passed without a response.
A couple of days ago I uploaded fine, but it's been like this since yesterday.