How to check entity side?
I search and found only this but i dont know how to use thats on entity.
#define TOUCH_NONE 1<<0 #define TOUCH_ALL 1<<1 #define TOUCH_BOTH 1<<2 #define TOUCH_HEAD 1<<3 #define TOUCH_FOOT 1<<4 #define TOUCH_OTHER 1<<5 Edit: I mean when player touch thats entity. |
Re: How to check entity side?
Do you want to determine which side of the entity that was touched?
I believe you have to compare origins and check which dimension is the closest to determine that. |
Re: How to check entity side?
I need if player stands on the block ,or touch side or hit his head to the block bottom
|
Re: How to check entity side?
Quote:
|
Re: How to check entity side?
How i said i need know whitch side bottom, top or sides
|
Re: How to check entity side?
Ok, then you just compare the differences from the entity origin and the player origin to the size of the entity and the one that is the lowest contains your answer.
EDIT: I found the subject interesting so I decided to try it out. This is the best I could create: There may be some math errors but I don't think so. If there is, it would be because it's 4AM here and I need to sleep. Code:
|
| All times are GMT -4. The time now is 06:28. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.