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 / Help needed with Rotating an object (DBP)

Author
Message
UAT Programmer
18
Years of Service
User Offline
Joined: 22nd Apr 2006
Location: Tempe
Posted: 22nd Apr 2006 11:51
I have been working on a final project for a game programming class and I can't seem to wrap my head around a line of code for making an object face the camera as the camera moves.

Intent- Make a plain face the camera as the camera moves so that the plane can be textured with enemy skins.

Last note: I am using the trial version of DB Pro, as I am a poor college student that can't afford the full version right now.

This is what I have come up with for my code, main game loop and code to try to turn the plain (obviously it doesn't work, but I though that it might be helpful to see what direction I was heading.)

-Sig comming soon-
Mr X
18
Years of Service
User Offline
Joined: 25th Sep 2005
Location: Universe, milkyway, sol-system, Earth...
Posted: 22nd Apr 2006 13:02
A tip about posting source codes:
[ code ] CODE HERE!!! [ /code ]
just remove the spaces from the taggs.


And about that question of yours (even though Ive not seen your source, it wontshow itself), you can use the "point object object number,x,y,z" command. Just put in the object number of the face and then the coordinates of the camera.

Goodluck.
UAT Programmer
18
Years of Service
User Offline
Joined: 22nd Apr 2006
Location: Tempe
Posted: 22nd Apr 2006 23:21
That worked out great, Thanks!
My original code was a complicated use of the Distance forumula (Square root of (x-x)^2 + (z-z)^2) that just wasn't working out.

-Sig comming soon-

Login to post a reply

Server time is: 2024-09-24 21:30:17
Your offset time is: 2024-09-24 21:30:17