Scripts / Moving Entities Left/Right

Author
Message
lordjulian
10
Years of Service
User Offline
Joined: 10th Jan 2014
Location:
Posted: 16th Jun 2020 12:29 Edited at: 16th Jun 2020 13:30
This might be a stupid question...

I know how to move entities up, down, forward and backward but how the Dickens can I move them left or right?

Say if I want a target to face forward while moving left.
Julian - increasingly disillusioned and jaded
PM
GubbyBlips
5
Years of Service
User Offline
Joined: 14th Jan 2019
Location:
Posted: 16th Jun 2020 18:05
With the red-neck method you can fake it with an object that doesn't matter what
it looks like rotating different angles. Just rotate it to the left of the player angle.
Achieved in my drone flying script--

But you are asking for true HEADLESS mode- if I'm not mistaken.
Some funky math- did you Google it?

https://www.youtube.com/watch?v=Xel71M1YdD8
PM
lordjulian
10
Years of Service
User Offline
Joined: 10th Jan 2014
Location:
Posted: 16th Jun 2020 19:56
Thanks. The drone video was a surprise but I think I have achieved it with rotation.
Julian - increasingly disillusioned and jaded
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 16th Jun 2020 21:42
The problem here is that "left" and "right" are relative to the entity, and that means the entity needs to have a 'forward' to make 'left' and 'right' meaningful.

The normal 'forward' for an entity is +Z axis for the entity, so 'left' would be -X and 'right' +X (all relative to the entity).

Positional functions are all world relative instructions, not entity relative.

To transfer entity relative angles to world relative you will need to use the quatlib functions.
Been there, done that, got all the T-Shirts!
PM
lordjulian
10
Years of Service
User Offline
Joined: 10th Jan 2014
Location:
Posted: 16th Jun 2020 22:37
OK. I'll look into that. Thank you.
Julian - increasingly disillusioned and jaded
PM

Login to post a reply

Server time is: 2024-04-19 18:13:42
Your offset time is: 2024-04-19 18:13:42