Keeping entity at a distance
Hello,
I am trying to keep a solid entity at a certain distance from player's view. For example: At 150 units in front of player and tracking the distance from player to entity. So far I am setting the entity velocity to keep it at a distance from player's view, but it works only if I move backwards, not forwards too. entity_set_aim() function is called on every think of entity. Code: Code:
Edit: Just achieved to move entity forwards and backwards by making the Speed positive and negative. But the entity is not staying in front of player. |
Re: Keeping entity at a distance
https://forums.alliedmods.net/showpo...39&postcount=3
Can you attach some screenshots so we can imagine whats happening? |
Re: Keeping entity at a distance
Here is a short video: https://vimeo.com/591185759
I wanna update the entity's origin within x units from player's front angle in aiming direction. |
Re: Keeping entity at a distance
Quote:
|
Re: Keeping entity at a distance
It doesn't work, it keeps spinning the entity in a sphere.
Edit: forgot to get view offset. It does work now, thank you! |
Re: Keeping entity at a distance
When using this function, the entity doesn't make solid or touchable while it is in a wall.
|
Re: Keeping entity at a distance
Quote:
Are you setting the entity maxs and mins? |
Re: Keeping entity at a distance
Quote:
Quote:
Edit: I created the entity using info_target instead of func_wall and now seems to work right. But, it's origin gets upwards if it touch a wall it seems. Video: https://vimeo.com/591807069 P.S.: I am dropping the entity every frame using EngFunc_DropToFloor right after using shift_entity_position() |
Re: Keeping entity at a distance
Show the code
|
Re: Keeping entity at a distance
PHP Code:
|
| All times are GMT -4. The time now is 07:43. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.