|
Hey MB Community,
I’m sure this question has been asked before, nevertheless I couldn’t find the answer so…
Can someone please tell me how to setup the Relationship contraint to allow for a Joystick to control the Local Navigation of an Object?
AKA, make it like a video games controls.
I currently have my setup so that (for example) pressing UP on the Joystick causes the Object to translate towards +Z by increment of X. You can use Pull Vector to remember the global coordinate of the object (so it doesn’t snap back to the origin) and continue pressing UP to continue translating +Z.
My issue is that this is Global Translation… if the object rotates (either by using another object as Aim-At interest, or by assigning other buttons on the pad to rotate on a specific axis) pressing UP continues to move globally +Z. Not “towards” where the object is facing.
Example: From the origin, I press UP once (which is set to apply increments of 20 towards +Z) and am at global coordinate 0,0,20. I rotate +90° on X-axis, facing my destination which is 20,0,20… however pressing up again brings me to 0,0,40. My local device gizmo is pointing where I want to go, but I can’t get there.
Not a practical method to navigate with outside of being direct behind the object in an orthographic view....
If anyone can solve this, very VERY appreciate!!
-e
Notes to anyone who takes up the cause:
-It is appearing more practical to control rotation with an Interest (that is also translated locally) then with Rotation… that way you don’t have to solve the Global to Local conversion twice.
-Many controllers will in a neutral position return a value of 50, pressing (for example) left will go to 0, right to 100. It’s easy to make this value go to a boolean, 0 or 1, just use GREATER THEN in the relationship editor… it’s a true or false result.
|