Rotate object to a given angle
The game I'm working on is an old-school precision shooter type thing which requires objects to rotate to specific angles (in quick 90 degree steps in six axes), but it's proving incredibly difficult.
It would be great if there was a Rotate To rotator, which behaves like a standard rotator but has an angle you can set for it to rotate to, along with the option to have it work in local space.
I've tried using Angle Sensors, but they don't work accurately enough at high rotation speeds. I've also tried using Look At rotators and gyroscopes, but eveything I've tried so far has limitations or physics that interferes with what I need.
If there were a Rotate To rotator, life would be so much easier and I'm sure it'd be useful for all kinds of other applications. It seems like something fairly basic that's missing from an otherwise comprehensive set of tools.
-
Hi,
not sure of the exact effect you want but potentially if you want to rotate instantaneously to one of several rotations you could simply create a keyframe for each one. Then toggle the correct one based on the stick input
hope that helps
Matt -
Or you can try using "match orientation" on a teleporter.
If you'd like to suggest that "rotate to" gadget in the feedback section that would be great. -
If you set an angular velocity of 2700, and trigger your rotation for 1 frame only, (e.g. a pulse signal), then that will turn it exactly 90 degrees.
Why 2700? The logic runs at 30 frames a second. Rotation values are in degrees per second., and there are 30 lots of 90 in 2700 (30 * 90)
댓글을 남기려면 로그인하세요.