Vertical Turns? :)
allc1865
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
What is a 'completely vertical angle' ?
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!
For example, for it to be turned on it's side while turning a corner.
Do you mean a 90° angle?
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
@tatiang, yes, at an angle while it's turning.
@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!
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.
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
How would that look like?
change attribute self.rotation?
Thanks, @jamie_c
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
@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.
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
@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.
Thank you
Oversteer !