Vertical Turns? :)

allc1865allc1865 Member, PRO Posts: 777

Hi guys!

I was trying to create an effect and I was wondering if any one could help me with this.

As my actor is accelerating, when it turns I want it to turn in a completely vertical angle. I haven't figured out a way to achieve this, so I was hoping someone could help!

Thanks so much!

Answers

  • SocksSocks London, UK.Member Posts: 12,822

    @allc1865 said:
    As my actor is accelerating, when it turns I want it to turn in a completely vertical angle.

    What is a 'completely vertical angle' ?

  • allc1865allc1865 Member, PRO Posts: 777

    hi, @Socks, when the actor turns, usually you'd just use the rotate behavior and that only gets you turned a little when you're cornering, but what I would like to happen is when you're cornering, you turn in a complete vertical line instead of just a partial one using the rotate behavior.

    Thanks!

  • allc1865allc1865 Member, PRO Posts: 777

    For example, for it to be turned on it's side while turning a corner.

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    Do you mean a 90° angle?

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

  • allc1865allc1865 Member, PRO Posts: 777

    @tatiang, yes, at an angle while it's turning.

  • allc1865allc1865 Member, PRO Posts: 777

    @tatiang, I've tried using the rotate to angle behavior so that when the left arrow is down, it'll rotate to that specific angle and give me the look I was going for, however, that doesn't work because you have to hold down the arrow key in order to get that look. I wanted you to just press it and then you were already at that angle.

    I hope that makes sense. Thanks for your help! :)

  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772

    If you want an immediate rotation change maybe try a Change Attribute Behavior and change the actors rotation to whatever you want it to be.

  • allc1865allc1865 Member, PRO Posts: 777

    How would that look like?
    change attribute self.rotation?

    Thanks, @jamie_c

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    Yes, let's say your actor is facing up (90°) and you want it to turn right (0°). You would do Change Attribute self.rotation to self.rotation-90.

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

  • allc1865allc1865 Member, PRO Posts: 777

    @tatiang, when my actor is moving and turning I'd like it to turn at a certain angle and stay that way.
    I did try the change attribute, and it didn't turn my actor at an angle while it turns.

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited July 2014

    I'll admit I'm lost. Can you sketch your idea and post it as an image or can you give a real-life example of what you mean, such as a car turning at an intersection?

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

  • allc1865allc1865 Member, PRO Posts: 777

    @tatiang, yes -

    As you see in this picture, the white actor is turing at a 57 degree angle, and I want him to stay turned at the same angle until he reaches the end of his turn, and then he's straighten back up and keep going until it's time to turn again.

    image

    Thank you :)

  • SocksSocks London, UK.Member Posts: 12,822

    Oversteer ! :)

  • allc1865allc1865 Member, PRO Posts: 777

    :) :D

Sign In or Register to comment.