Sign in to follow this  
thedodgeruk

if i have a position of the target model and shooter model, how do i get the matrix

Recommended Posts

i have the shooter model , and the target model.

i have the positions of these models , so i can get the vector between them
and i have the start position.

i want to create a rocket to go from the shooter to the target.

so i use the shooter position for the rocket position , and i have the vecter between the shooter and target , but how do use the vector to make the rocket into the correct matrix, so it is pointing towards the target ??

Share this post


Link to post
Share on other sites
He don't want to know the distance between the two points, he want the matrix of it's projectile at some time between the two targets.

A matrix is formed from position and rotation. You know the position (moving from shooter to target at a certain speed), and the rotation can be determined from the vector facing between the two. There's a way to get the rotation (either in Euler angles or quaternion) from a forward vector.

Share this post


Link to post
Share on other sites
This topic is discussed frequently; try searching the forums for phrases such as 'billboarding', 'align with normal', 'align with vector', 'align model', etc.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this