Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / Confusing position stuff

Author
Message
Drifter
21
Years of Service
User Offline
Joined: 24th Jun 2003
Location:
Posted: 25th Jul 2003 06:02
I'm try to get a little 3D target to appear exactly 60 (units?)away from my ship and it has to be straight ahead. I tryed all this COS SIN stuff that my dad tried to teach me but I'm pretty young and it doesn't work. Can someone help me?
"Sun makes me sneeze but thats a different story"
TKF15H
21
Years of Service
User Offline
Joined: 20th Jul 2003
Location: Rio de Janeiro
Posted: 25th Jul 2003 06:20
position the target in the same place as the ship, point it in the same direction the ship is in, then:
move object (target number), 60

I need an animator!!! HELP ME!!
Drifter
21
Years of Service
User Offline
Joined: 24th Jun 2003
Location:
Posted: 25th Jul 2003 06:20
But then you would see it go. Isn't there a way to find you the position in the first place?

"Sun makes me sneeze but thats a different story"
John H
Retired Moderator
22
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 25th Jul 2003 06:32
Try exploring the SYNC command (if thats what your thinking about) and the MOVE OBJECT and POSITION OBJECT commands elsewise.

RPGamer

Current Project: Eternal Destiny
Porting all files to my new computer
Drifter
21
Years of Service
User Offline
Joined: 24th Jun 2003
Location:
Posted: 25th Jul 2003 06:33
ok thanks but I'll take it there is no easy way to get that position .

"Sun makes me sneeze but thats a different story"
ReD_eYe
22
Years of Service
User Offline
Joined: 9th Mar 2003
Location: United Kingdom
Posted: 25th Jul 2003 11:29
newxvalue and newzvalue???
this will give you the position 60 units ahead of you

newx#=newxvalue(currentx#,current y angle#,60)
newz#=newzvalue(currentz#,current y angle#,60)
newy#=newyvalue(currenty#,current x angle#,60)

the variables newx# and newz# and newy# now contain the exact position 60 units in front of your current position at the same angle that you are facing.

You know whats weird???
Donald duck never wore pants, yet everything time he got out of the shower he put a towel around his waist...
Whats with that???
John H
Retired Moderator
22
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 25th Jul 2003 18:46
I still dont quite get what hes asking

Current Project: Eternal Destiny
Porting all files to my new computer
TKF15H
21
Years of Service
User Offline
Joined: 20th Jul 2003
Location: Rio de Janeiro
Posted: 25th Jul 2003 18:48
If you turn SYNC ON, position the object, move it, THEN sync, you won't see it go.
ReD_eYe's idea is basically the same thing.

I need an animator!!! HELP ME!!
Drifter
21
Years of Service
User Offline
Joined: 24th Jun 2003
Location:
Posted: 25th Jul 2003 19:27
thanks everybody


"Sun makes me sneeze but thats a different story"
ReD_eYe
22
Years of Service
User Offline
Joined: 9th Mar 2003
Location: United Kingdom
Posted: 25th Jul 2003 23:14
@TKF15H
good point, wasn't thinking too hard when i posted my slightly more complicated version, unless you moved the object in small increments you won't see it move at all, although if it was called every loop it would look like it was jumping backwards and forwards from the player to the correct point, my way will just move it to the next posisition straight away

You know whats weird???
Donald duck never wore pants, yet everything time he got out of the shower he put a towel around his waist...
Whats with that???
TKF15H
21
Years of Service
User Offline
Joined: 20th Jul 2003
Location: Rio de Janeiro
Posted: 26th Jul 2003 00:02
You wouldn't see it move at all on my version. You can move an object over 10 times in a loop and the only one that matters is the one before the next sync.

I need an animator!!! HELP ME!!
Lecks
21
Years of Service
User Offline
Joined: 20th Jul 2003
Location: - Please Select -
Posted: 26th Jul 2003 10:51
another way to position it would be to make the target a limb of your ship. i think.

this would work wouldnt it?

Login to post a reply

Server time is: 2025-05-19 16:13:21
Your offset time is: 2025-05-19 16:13:21