Using sio2LookAt
2 posters
Using sio2LookAt
I don't quite understand what it wants. It says (vec3, vec3, vec3). Which vectors do I put in it? I tried putting a vec3 in just the first. There are no good docs on how to use the functions...
teh1ghool- Posts : 5
Join date : 2009-10-27
Re: Using sio2LookAt
1) Vec3: Eye Position
2) Vec3: Target Position
3) Vec3: Up Vector (Typically 0, 0, 1)
Example:
2) Vec3: Target Position
3) Vec3: Up Vector (Typically 0, 0, 1)
Example:
- Code:
vec3 targetPos;
vec3 upVector;
sio2LookAt(sio2->_SIO2camera->_SIO2transform->loc, &targetPos, &upVector);
ColorDelta- Posts : 16
Join date : 2009-03-25
Location : London, UK
Re: Using sio2LookAt
Thanks! I am going to add this as an entry to the wiki - The function isn't even on there.
-- Actually: What's the point of the vector if you provide the eye and target positions?
-- Actually: What's the point of the vector if you provide the eye and target positions?
teh1ghool- Posts : 5
Join date : 2009-10-27
Re: Using sio2LookAt
Using this function crashes the engine. Here's my code. Wow @ learning curves.
- Code:
// Look at Cube.
SIO2object *_SIO2object = ( SIO2object * )sio2ResourceGetObject( sio2->_SIO2resource, "object/Cube" );
vec3 targetPos;
vec3 upVector;
upVector.x = 0.0f;
upVector.y = 0.0f;
upVector.z = 1.0f;
sio2LookAt(sio2->_SIO2camera->_SIO2transform->loc, _SIO2object->_SIO2transform->loc, &upVector);
teh1ghool- Posts : 5
Join date : 2009-10-27
Permissions in this forum:
You cannot reply to topics in this forum
|
|