Adding to current position.

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Dawg

If you’re confused, what I am asking is how do I get the current position of a kinematic body and a vehicle body and add there current pos by a certain number?
(with a fps starter I move around and I press a key to activate the script with the adding to current pos feature basically a dash thing)


Godot 3D

:bust_in_silhouette: Reply From: Cire_arievilo1

maybe something like that?

Var addPos = 5
Position.x += position.x + addPos

sorry I’m on mobile and can’t test the code.

Thank you! I’ll test it out, but I appreciate your help! I’ll Reply again if I see an error or it works. I’ll also send the code. Thank you!

Dawg | 2022-10-26 13:55

So, how do I get the rotation and move forward a few units where its rotating using this script here: apply_impulse(Vector3(Rotation), Vector3(Position))

Dawg | 2022-10-26 14:30