Set origin entity to ground
Hi everyone, there's a way to set the origin of an entity to ground?
I tried this way of metalicross: PHP Code:
|
Re: Set origin entity to ground
|
Re: Set origin entity to ground
And without that? I need to know what I'm doing, the way using vectors like the stock I posted
|
Re: Set origin entity to ground
Doing more calculations to reach the same end result that a simple native call would do for you makes no sense, just follow the damn suggestion CJ.
|
Re: Set origin entity to ground
Quote:
Quote:
|
Re: Set origin entity to ground
Quote:
Code:
stock GetUserEyePosition(iId, Float:vecReturn[3], Float:fNormalDist) |
Re: Set origin entity to ground
I get it... thank you all. And thanks McTravish
|
Re: Set origin entity to ground
Yes, there is a way to set the origin of an entity to the ground. One way to do this is by using the TraceLine function to trace a line from the entity's current origin to a point below it (for example, the origin minus the entity's view offset) and then using the TraceEndPos output to set the entity's origin to the point where the trace hit the ground. This method is similar to the one you provided, but you can use the TraceEndPos output to set the origin of the entity.
Another way to do this is using a plugin like 'groundme' which is a plugin that can be used to change the origin of an entity to the point where it is on the ground. You can also use the built in function 'engfunc(EngFunc_SetOrigin, ent, origin_vector)' where ent is the index of the entity and origin_vector is the new origin for the entity. This will change the origin of an entity to the specific origin that you provide. You can also use the built-in function 'engfunc(EngFunc_DropToFloor,ent)' where ent is the index of the entity. this will set the origin of the entity to the point where it is on the ground. |
All times are GMT -4. The time now is 10:30. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.