Hello. I’m rotating object using “Local Rotation functions” like AddActorLocalRotation and need to be able to change the local axis direction eventually so that object would rotate around that new “local axes”. Is there a way to change that “local orientation” programmatically? Like SetPivotOffset but angular. Thanks
The typical way is to use another actor or scene ( if you’re inside a blueprint ) as the pivot, attach the two, and rotate that.
Technically, although it is possible to do the rotation purely mathematically without this help, if that really is what you want, then you might be better of learing how to use Matlab
Can you give more info on how it’s done exactly? Attaching actor to another actor… I’m very new to Unreal Engine. Afaik attaching Static Mesh to RootComponent And rotating “the whole thing” rotates Static Mesh also, not just the pivot. I’d appreciate if you can explain what you mean in more detail. And also I want to clarify that I need to change local axis orientation in code (it’s ok if blueprints) at runtime - not just in editor. Thanks!
Attaching one actor to another can be done in the world outliner, just drag one onto the other
Yeah, don’t go there. Math enthusiasts only.
I’ll try that. Thank you!
I got it working in C++ with SetActorRelativeRotation on the child actor attached - as @ClockworkOcean suggested - to “the base actor”. I guess the thing is to detach base actor, rotate it and attach again through AttachToActor, DetachFromActor functions.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.