Entity collision size
Hello. I've been having a problem that I can't solve... The entity's collision size with other entities is fine, but the collision with the world is not. I'll show two different images that will let you understand my problem.
The green line is the "good" collision size. The red line is the "bad" one, but it only happens with a corner of the entity as you can see. Players and other entities collide with the green size, while world and brushes with the red one. Sorry for my bad english, hope you can help me :). PD: I've been giving velocity to the entity so it can move around, if that helps...
Spoiler
PHP Code:
|
Re: Entity collision size
Quote:
|
Re: Entity collision size
Quote:
|
Re: Entity collision size
Quote:
|
Re: Entity collision size
Quote:
I guess you are not understanding. The player collides with the entity's real size ( the green one ) and the world collides with some strange size ( the red one ). I've been searching a lot but I can't find anything related to my problem. I've tried changing the way I create the entity ( movetype or solid first, origin at the end, etc ) and it didn't work. |
Re: Entity collision size
I think I've come across your problem before. Try setting the solid type before the model.
Also, the entity will collide with everything even without the size set as long as it's solid. |
Re: Entity collision size
Quote:
I'll give more examples. I'll draw the size of the entity with a function, and print it's information. PHP Code:
Spoiler
As you can see, the entity should have fallen but it didn't. |
Re: Entity collision size
Try other movetypes.
Quote:
|
Re: Entity collision size
Quote:
|
Re: Entity collision size
Quote:
@wickedd: ? it should have fallen by gravity. EDIT: No results, I tested with MOVETYPE_BOUNCE, MOVETYPE_TOSS, MOVETYPE_BOUNCEMISSILE, MOVETYPE_FLY, MOVETYPE_FLYMISSILE. I'm pretty sure server would crash with MOVETYPE_PUSH, and MOVETYPE_STEP makes the model disappear. I've been using MOVETYPE_PUSHSTEP because its the one that gives me the best results :/ This is the code I actually have. If you see something wrong please tell me. Players collide with the "red box" in the last picture I uploaded, but for some reasons the size is a bit bigger when it collides with the world. PHP Code:
|
| All times are GMT -4. The time now is 09:20. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.