Physic (gravity) issue

Hi everyone,
I'm trying to make an actor simply fall in a rotating environment, but I can't handle it...
Here some details: I have an empty box rotating 90 degrees every, let's say, 3 seconds. In this box I added an actor which rotates with the box while it rotates (I added a lockdown attributes that "release" the actor when the rotation ends), and when it stops, the actor should simply fall.
I've seen TSB's tutorial where he says to use accelerate behaviour instead of gravity, and that's what I did.
So, when the rotation ends, the actor has an accelerate behaviour with 270 as direction (relative to scene) and a speed of 400.
The problem is that, even if I've tried "playing" with physic attributes, the actor doesn't move just on the Y axis...it slightly tends to move left or right too (just 1 or 2 pixels, but I need to keep the X position fixed)...
Do you have any ideas on how to resolve this issue?
Thanks a lot
I'm trying to make an actor simply fall in a rotating environment, but I can't handle it...
Here some details: I have an empty box rotating 90 degrees every, let's say, 3 seconds. In this box I added an actor which rotates with the box while it rotates (I added a lockdown attributes that "release" the actor when the rotation ends), and when it stops, the actor should simply fall.
I've seen TSB's tutorial where he says to use accelerate behaviour instead of gravity, and that's what I did.
So, when the rotation ends, the actor has an accelerate behaviour with 270 as direction (relative to scene) and a speed of 400.
The problem is that, even if I've tried "playing" with physic attributes, the actor doesn't move just on the Y axis...it slightly tends to move left or right too (just 1 or 2 pixels, but I need to keep the X position fixed)...
Do you have any ideas on how to resolve this issue?
Thanks a lot
Comments
tell the computer with a changeAttribute or constrainAttribute to make it so.
if you do not know the exact X when rotation stops:
create an actorAttribute on the prototype … real type … name it … myX
and when rotation stops … change that to self.Position.X
and do your change or constrain to self.Position.X To: myX
also check that your actor is an even number of pixels in width and in height
@rebine … your project sounds exciting!
@};- MH
I'll try it out this evening and then I'll let you know
Thanks
I've just tried what you suggested, and it works great!
Thanks a lot!!!