plane normal
Hello, I'm trying to angulate entity according to the ground, but keep its view direction.
https://i.imgur.com/nU3CuSc.jpg I tried to get global plane normal vector and convert it to angle vector, but didn't work properly. Code:
Any suggestion? |
Re: plane normal
Look it lie flat plugin, it may help.
|
Re: plane normal
FYI, "normal" means perpendicular to the plane, not parallel. So, the normal vector for that plane would point up, slightly to the right.
|
Re: plane normal
Hmm, it's not working properly with my entity, it's rotating to left/right side, not to its view direction.
Spoiler
|
Re: plane normal
code form my spray plugin
PHP Code:
|
Re: plane normal
After some tests I noticed that the angles it's right, what is not right it's the velocity vector.
For some reason the car rotates while moving in a terrain not parallel (horizontal), always to left/right side. EDIT: Actually car still rotates even if not moving. |
| All times are GMT -4. The time now is 07:30. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.