I for the life of me cannot figure out how to make an object stay upright.
I’m creating a horse system, and I’m trying to experiment to see if I can get the system to work with the newish stuff that replace BodyGyro and whatnot.
I haven’t even gotten into moving the thing yet (my brief experiment with AngularVelocy failed) but I can’t get the darn thing to stay upright. I don’t need it to constantly lock to a flat plane - it should tilt for things like hills. But, if the horse falls over I cannot get it to stand back upright.
Any ideas? AlignOrientation is absolutely stumping me.
Set the mode for the AlignOrientation to One Attachment and put an Attachment inside the Main part of the Horse or whatever, then set the Attachment0 of AlignOri to the attachment inside the Horse.
Now you can control the Orientation of the Horse (it uses CFrame instead of Vector) by changing the values of the Orientation attribute
Alright, so since it’s currently essentially locking the horse to one specific angle, in order to turn the horse I’d just modify whichever one of those axes that is setting it to look towards a specific point? Seems fair enough, though I’m not sure why it’s capped at 1 for any value I input - does that have something to do with Vector3.Unit? If so, what’s the best way to adjust this to, for example, slowly turn the horse?
Ohhhhh, alright! I was too busy paying attention to the PrimaryAxis/SecondaryAxis. That works!
1 Like