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.

Newcomers DBPro Corner / camera movement

Author
Message
Damokles
21
Years of Service
User Offline
Joined: 28th May 2003
Location: Belgium
Posted: 25th Sep 2003 23:29
Can anyone tell me how to solve that problem ?



In the upper code, you see one try (of many), I want to press the up and down key to turn around that cube, like it works on the lower code for left and right.



Thanks

"Begin at the beginning, and go on till you come to the end: then stop." - Lewis Carroll
Bishop
21
Years of Service
User Offline
Joined: 18th Dec 2002
Location: In my favorite chair...
Posted: 26th Sep 2003 07:10
i see what your saying, but why not use simpler commands? i don't know if it is what you want, but here it is anyway...

"When you were born, you cried and the world rejoiced. Live so when you die, the world cries and you rejoice."
Damokles
21
Years of Service
User Offline
Joined: 28th May 2003
Location: Belgium
Posted: 26th Sep 2003 20:35
Thanks, but in fact, it's for a game. and the cam will follow a certain object with the distance 10 (that's why Newzvalue(0,aY#-180,10)) and sometimes you can see this object from every side you want, into pushing up, down, right, left. And the object shall not turn in the scene, so the camera should move.

"Begin at the beginning, and go on till you come to the end: then stop." - Lewis Carroll
Damokles
21
Years of Service
User Offline
Joined: 28th May 2003
Location: Belgium
Posted: 28th Sep 2003 12:43
I simply want to mix these two codes :



and



When I do it, it doesn't work properly.
And there is a problem with the second one : when you press up or down too long, it stops, and turns in the wrong way

"Begin at the beginning, and go on till you come to the end: then stop." - Lewis Carroll
Scorpyo
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: italy
Posted: 28th Sep 2003 18:05
you have to wrap the value here too:

cX# = Newxvalue(0,aZ#-180,10)
cY# = Newzvalue(0,aZ#-180,10)

i.e. cX# = Newxvalue(0,(wrapvalue(aZ#-180),10)
or

aZ2# = wrapvalue(aZ#-180)
cX# = Newxvalue(0,aZ2#-180,10)
cY# = Newzvalue(0,aZ2#-180,10)
Damokles
21
Years of Service
User Offline
Joined: 28th May 2003
Location: Belgium
Posted: 28th Sep 2003 19:29
The problem remains

"Begin at the beginning, and go on till you come to the end: then stop." - Lewis Carroll
Andrew
21
Years of Service
User Offline
Joined: 23rd Aug 2003
Location: United Kindom (what makes it important?)
Posted: 28th Sep 2003 19:36
I see what you are going on about, you basicaly want the camera to follow the object movement.
So basically if the cubde moves, you want the camera to move with it.

Is this what you are saying because i can help?

My game will make sure Final Fantasy will never be forgotten.
Remember me because my game will be in the shops in a year or 2.
Damokles
21
Years of Service
User Offline
Joined: 28th May 2003
Location: Belgium
Posted: 28th Sep 2003 20:12 Edited at: 28th Sep 2003 20:39
Not really, I know how to make the camera follow the cube (even if it's not a cube in the game). I want to be able to turn the camera around that cube with the buttons left, right, up and down and the distance from the cube shall be 10.

Imagine that this cube is a house, and you want to see it from every side, also from below and from above, , so I have to turn the camera around it.

"Begin at the beginning, and go on till you come to the end: then stop." - Lewis Carroll
Scorpyo
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: italy
Posted: 29th Sep 2003 23:03
I have no time to code it..there is a recent post somewhere either here or at RGT forums about latitude / longitude coords of a point on a sphere..
I think that tweaking a bit that code and keeping the sphere radius to 10 and positioning the cam at the point on the sphere with your cube in the center of it could do the trick for you..
Sorry if i'm not helping much anyway
Cheers
spooky
22
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 30th Sep 2003 03:35
Probably a load of rubbish but try:



If your mansion house needs haunting, just call Rentaghost!
Damokles
21
Years of Service
User Offline
Joined: 28th May 2003
Location: Belgium
Posted: 30th Sep 2003 20:28 Edited at: 30th Sep 2003 21:18
Thanks, Spooky, rubbish can be usefull sometimes
It's really near to what I was asking for, and you solved a problem, I didn't even think about : stopping the rotation when we're on the top or on the bottom (Or I would see the house upside down).

Just wondering if there is not an easier way to do it

"Begin at the beginning, and go on till you come to the end: then stop." - Lewis Carroll

Login to post a reply

Server time is: 2024-09-21 01:16:09
Your offset time is: 2024-09-21 01:16:09