- Joined
- May 21, 2006
- Messages
- 323
I have implemented a 3rd person Cam view into my map, a problem I had to deal with was that
the Z offset of the cam didnt moved with the unit, when the cammed unit moved to a higher or lower stage.
I tried to solve the problem through trigger it with Z of Cammed unit
Every 0.20 sek
If Z of Cammed Unit Greater than or equal to 0
and Less than 200
Set Z offset of Cam to Z of Point of Unit
The Problem is there that the Z of the cam is not the same Z as the Cammedunit
So i had to make more triggers
If Z of Cammed Unit Greater than or equal to 200
and Less than 300
Set Z offset of Cam to Z of Point of Unit - 100
...
If Z of Cammed Unit Greater than or equal to 1000
and Less than 1200
Set Z offset of Cam to Z of Point of Unit - 600
So my question is, if anyone knows an algorithm to calculate the perfect cam Height.
would be helpful
the Z offset of the cam didnt moved with the unit, when the cammed unit moved to a higher or lower stage.
I tried to solve the problem through trigger it with Z of Cammed unit
Every 0.20 sek
If Z of Cammed Unit Greater than or equal to 0
and Less than 200
Set Z offset of Cam to Z of Point of Unit
The Problem is there that the Z of the cam is not the same Z as the Cammedunit
So i had to make more triggers
If Z of Cammed Unit Greater than or equal to 200
and Less than 300
Set Z offset of Cam to Z of Point of Unit - 100
...
If Z of Cammed Unit Greater than or equal to 1000
and Less than 1200
Set Z offset of Cam to Z of Point of Unit - 600
So my question is, if anyone knows an algorithm to calculate the perfect cam Height.
would be helpful