(Using Godot 4.6)
I’m relatively new to Godot and Gdscript. I’m currently stuck on making part of my character’s moving system. I’ve tried to do some research on this but I haven’t found anything that works yet.
The player is a CharacterBody3D, and the script is comparable to the default movement script. It can move around just fine.
There is a ball object also in the scene. The player can walk up to it and interact with it, in which case the balls visuals and collider get parented to the player (and when unequipped are put back in the parent node). Then, as the player walks, the visuals+collision will rotate around in place so it appears as though it’s being rolled.
(As a side note, the ball’s rolling is controlled in the ball’s script, not the player’s)
My current issue:
I am trying to add a movement function only when both the ball is equipped and either actions ‘orbitLeft’ or ‘orbitRight’ are being held down (Mapped to Q and E). What I want to do is have the player walk around the perimeter of the ball (ideally with the camera following) in those directions, without the ball itself actually moving while the orbiting is happening.
I can supply parts of scripts if needed. Any help is appreciated!