Hi, for a project I was asked to use godot with orchestrator, the famous visual scripting plugin. I am used to gdscript and from there I can easily change the speed of the characherbody2d on both x-axis and y-axis, but on orchestrator I have not found how to do it.
Would those who are more knowledgeable be able to give me some tips?
Thank you but how can I do it?
For example I am making a small platformer and I would like to separate velocity.y and multiply it with gravity and delta, and velocity.x with the character’s speed
How can I do something like that on orchestrator?
Extends CharacterBody2D
func _physics_process(delta):
# Vector2( 0 , 1 ): is gravity direction
# delta * 980: pixel gravity constant multiplied by the change in time.
self.velocity = self.velocity + ( Vector2( 0 , 1 ) * ( delta * 980 ) )
self.move_and_slide()
I noticed i could have connected the delta from physics process event. But I hope you can see the picture.
Also if you want to work with a single axis in isolation, you can break a vector like this example from the link.
You just have to recompose it back into a vector (make vector from float ) before you set velocity.