Skip to main content
gamedev.net
🔒 Locked

Floating above an environment

Started by SFA Oct 11, 2005 at 10:43 AM 0 replies 300+ views
Original Post
SFA
SFA
Hi there. Lets say I have an object on an environment at point (a). I also know the normal of the polygon the creature is currently on (n). What I want to do is move the creature from point (a) to an arbitrary position above the polygon, along the polygon's normal. How would I calculate point (b)? Previously I've just been adding a small amount to the y component of the object's position, but now my environments are very complex (for example a globe with mountains and cliffs), so obviously that technique is inadequate. Any help would be great! I expect the answer to be pretty simple, but my brain's frazzled.
http://www.voodoo-magic.co.uk
Zakwayda
Zakwayda
I would think the answer to your question as stated would be b = a + amount*normal. However, I'm guessing that what you're really trying to do is more complicated than that...

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.