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.

Dark GDK / Object disappears when I set a new position.

Author
Message
MES
16
Years of Service
User Offline
Joined: 9th Feb 2008
Location: AFK
Posted: 9th Feb 2009 15:35
Hi,
with

I'm loading my Object. I can see it, the walking animation works and it has collision etc.
Now I want it (the knight) to walk on my heightmap.

Then the knight moves, but disappears when the heightmap gets higher.
So I thought, that I could take the same code I use for the camera:

For the camera this code is working correctly.
But when I change it to use it for my Object,

The Object just disappears (or it gets somewhere, where I can't find it).

Where is the mistake?

regards

http://www.Computer-Masters.de
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 9th Feb 2009 18:16
Not enough code to tell for certain. Maybe you forget to use dbAutocamOff()?

andiconda
15
Years of Service
User Offline
Joined: 10th Feb 2009
Location:
Posted: 10th Feb 2009 20:37
i noticed you got the height of the terrain but failed to get the height of the object
the object draw point could be at the top meaning, you are positioning your model directly under the terrain instead of over

another sudjestion, using dbpositionobject should happen after you move it
you are doing this
find height at position a
move to position b
position object (bx,ay,bz)
so your model is likely to dip underground a bit

you should
move to position b
find height position b
position model at (bx,by,bz)
andiconda
15
Years of Service
User Offline
Joined: 10th Feb 2009
Location:
Posted: 10th Feb 2009 20:38
i noticed you got the height of the terrain but failed to get the height of the object
the object draw point could be at the top meaning, you are positioning your model directly under the terrain instead of over

another sudjestion, using dbpositionobject should happen after you move it
you are doing this
find height at position a
move to position b
position object (bx,ay,bz)
so your model is likely to dip underground a bit

you should
move to position b
find height position b
position model at (bx,by,bz)

in other wards your moving it but using the height from the last position instead of the current

Login to post a reply

Server time is: 2024-11-25 13:33:52
Your offset time is: 2024-11-25 13:33:52