Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | HB | |
Old Version | Published before Godot 3 was released. |
I have a spatial node that parents both a test cube and a camera for a third-person character. Currently I have a script controlling all of my motion on the spatial node, including rotation. However, I do not want the test cube to copy any of the rotation except for the Y axis rotation, so that it stays “flat” on the X-Z plane even when I look up and down. As it stands I’m trying not to make scripts for objects that I don’t think really need them; is there a way I can simply disable some of its inheritance properties through a menu? This is what I have at the moment if you need to see the tree:
Currently I just don’t allow changes in pitch angle, and as you can see, I need to use the spatial as a pivot point for the camera, which is a bit behind the cube and spatial. Ideally I want to accomplish this all within one script instead of having some motion in one script and some motion in another.