Actor to resume to original Y axis after collide with ramp.

DonaldoukDonaldouk Member, PRO Posts: 63
Hi Guys,

I have a problem, sounds quite simple, but I cant work it out.

ok, i have a runner running toward a ramp which is rotated to 30degree and after the ramp the actor is carrying on the angle the ramp is on.

the runner is running at pos y: 90 throughout the game apart from jumping.

How do I tell him to drop to pos y:90 after the ramp, if jump is not pressed.

cheers

Don

Comments

  • DonaldoukDonaldouk Member, PRO Posts: 63
    Bump!
  • ericzingelerericzingeler Member Posts: 334
    Is the actor not dropping to 90 because its rotated?
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    So is the problem that the actor is falling past Y=90 (e.g. to the bottom of the scene) or that the actor doesn't come back down to Y=90?

    If it's the former, you could always do When attribute self.position.Y<=90... Constrain Attribute self.position.Y to 90.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • DonaldoukDonaldouk Member, PRO Posts: 63
    @ericzingeler yes because the ramp is rotated. Causing my runner to continue at 39 degree.

    @tatiang the actor doesn't come back down. I tried an attribute like when onramp is true, jump is false, after 1sec (time taken to get to the end of the ramp) move actor 270 degree. But not working.

    After the ramp if I do press jump it will gradually come back down. But I want it to drop naturally like gravity, when he is off the ramp.

    Are there a way to tell the runner that straight after the ramp, if jump not pressed, move or accelerate to y90?

    Well I have a blocker stopping the actor dropping past Y90.
Sign In or Register to comment.