How to make entity follow players aim ?
How to make entity follow players aim ?
Like in Half-Life.When you use rocketlauncher it fires rocket and it follows your aimpoint |
Re: How to make entity follow players aim ?
Basically,
- You retrieve the direction between the aim point and your origin - Your normalize the vector - You convert the vector into an angle. - You set this new angle for the entity. |
Re: How to make entity follow players aim ?
Can you explain me more about first and second statements
|
Re: How to make entity follow players aim ?
Sorry not exactly what I wanted to say.
For 1/ and 2/ ; I was meant the direction between the end position ( where you aim ) and the entity origin. By getting the direction you can retrieve an angle of it and changing the entity angle. Code:
|
Re: How to make entity follow players aim ?
This works. Thank you very much ! :)
|
| All times are GMT -4. The time now is 17:31. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.