#How do i make a dash with the direction of this ray?
1 messages · Page 1 of 1 (latest)
Just get the direction of the ray and rotate it.
direction = direction.rotated(global_rotation)
uhh...
It has to be called on a Vector2. I imagine you want the raycast's target_position
I don't think i understood...
Oh, ok
Example:
Vector2.RIGHT.rotated(PI/2)
This gets you a vector rotated 90 degrees, which would mean pointing down due to starting pointing to the right
Wait, where do i put the target position here?
Nevermind, i got it working, but when i try to place more than one dash panel, it still only uses the direction of the first raycast
Your code may be fetching the exact same raycast each time.
Make sure to not use node paths.
And what do i use then?
Groups, autoloads, some sort of controller to handle references.
Node paths are only suitable for prototyping or one-and-done scenes.
I see...