Advertisement

Math Question

Started by May 29, 2001 06:48 PM
11 comments, last by Nazrix 23 years, 8 months ago
Yeah, Bishop, thanks. I will have to look into it.



A CRPG in development...

Need help? Well, go FAQ yourself.
Need help? Well, go FAQ yourself. "Just don't look at the hole." -- Unspoken_Magi
Actually, I made my last post in haste, because I wanted to say something about the code I sent you, but there are other ways to do that, and anyway, you might want something a little different. To begin with, probably the fastest way to ''look at'' something is to define the lookat vector, define an ''up'' vector which is at least somewhat different from the ''lookat'' vector, and get a normal to those two vectors. That new vector would be your sideways vector. From there, compute a normal to the ''lookat'' vector and the sideways vector to compute the proper orthogonalized ''up'' vector. So that creates and points a camera. Big deal. I think you may want to create an animation of a camera moving from some position and smoothly moving into a new position. There are ways to do this. One way would be define accelerations by splines, and key frames and interpolation. But this might not be constrained to a certain required constraints such as neck muscles or paths... It gets kind of complex.

You might want to describe EXACTLY what you are after.

_______________________________
"To understand the horse you'll find that you're going to be working on yourself. The horse will give you the answers and he will question you to see if you are sure or not."
- Ray Hunt, in Think Harmony With Horses
ALU - SHRDLU - WORDNET - CYC - SWALE - AM - CD - J.M. - K.S. | CAA - BCHA - AQHA - APHA - R.H. - T.D. | 395 - SPS - GORDIE - SCMA - R.M. - G.R. - V.C. - C.F.
Advertisement
quote:
Original post by bishop_pass

Actually, I made my last post in haste, because I wanted to say something about the code I sent you, but there are other ways to do that, and anyway, you might want something a little different. To begin with, probably the fastest way to 'look at' something is to define the lookat vector, define an 'up' vector which is at least somewhat different from the 'lookat' vector, and get a normal to those two vectors. That new vector would be your sideways vector. From there, compute a normal to the 'lookat' vector and the sideways vector to compute the proper orthogonalized 'up' vector. So that creates and points a camera. Big deal. I think you may want to create an animation of a camera moving from some position and smoothly moving into a new position. There are ways to do this. One way would be define accelerations by splines, and key frames and interpolation. But this might not be constrained to a certain required constraints such as neck muscles or paths... It gets kind of complex.

You might want to describe EXACTLY what you are after.








Yes, I am really only looking to make the character move all at once to point a certain point. Nebula (the engine I'm using) does have a function to do it, but I cannot quite get it right. So, I thought of doing it myself. What you described does sound like what the Nebula lookat() function does though. I should probably just learn to use their lookat() function.

The reason why I asked the original question about solving for the angle by doing:
angle=acos(x)

is that I thought if I could find the angle my lookat point is located I can then move to that angle. This actually worked for me, but it only worked if the camera was at 0,0,0.

So, basically it comes down to figuring out how to use Nebula's lookat() function or doing it myself.

Ironically, making the camera smoothly move from one point to another would be easier than what I'm trying to do (instantly look at a point) 'cause Nebula has keyframe animation built in.



A CRPG in development...

Need help? Well, go FAQ yourself.


Edited by - Nazrix on May 31, 2001 3:06:36 AM
Need help? Well, go FAQ yourself. "Just don't look at the hole." -- Unspoken_Magi

This topic is closed to new replies.

Advertisement