AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Solid entity with negative z origin at spawn (https://forums.alliedmods.net/showthread.php?t=132191)

joropito 07-12-2010 20:17

Solid entity with negative z origin at spawn
 
Currently I'm having this problem.

I create an entity (info_target), set model, set sizes, set origin, BBOX+FLY.

That's working fine in certain maps but on some maps not.

The problem is, the entity is solid but when you walk over the entity, it seems like you get partially blocked. You can continue walking but is not smooth.

I found that the problem starts when that origin has Z axis with negative numbers.
For example, this happens at

- de_dust (T spawn area)
- de_nuke (T & CT spawn area)
- awp_map (T & CT spawn area)

Someone knows what's happening?

Thanks.

Hunter-Digital 07-13-2010 04:45

Re: Solid entity with negative z origin at spawn
 
I tested serval SOLID_ types on same positive z origin and they all 'lagged' me around eventually...

Try SOLID_BSP a bit and see how it acts.

I was trying to block dropped weapons too, but they seemd to ignore SOLID_BBOX and slowly drown in SOLID_BSP... weird.

ot_207 07-13-2010 07:31

Re: Solid entity with negative z origin at spawn
 
Quote:

Originally Posted by joropito (Post 1237152)
Currently I'm having this problem.

I create an entity (info_target), set model, set sizes, set origin, BBOX+FLY.

That's working fine in certain maps but on some maps not.

The problem is, the entity is solid but when you walk over the entity, it seems like you get partially blocked. You can continue walking but is not smooth.

I found that the problem starts when that origin has Z axis with negative numbers.
For example, this happens at

- de_dust (T spawn area)
- de_nuke (T & CT spawn area)
- awp_map (T & CT spawn area)

Someone knows what's happening?

Thanks.

This is weird, I think that it has something to do with the engine. I suggest trying 3 things.
1. Try other solid types.
2. Change movetype to entity, i think that MOVETYPE_FLY can also affect what you are trying to do.
3. Block the touchforwards with the entity.

joropito 07-13-2010 09:16

Re: Solid entity with negative z origin at spawn
 
I'm going to make a lot of this entities so I prefer to not use any forward.

Wait I found after "a lot" of checks:

- If I put entity with negative Z it works fine.
- If I drop to floor (engine/fakemeta) the problem starts
- If I drop using TOSS + !FL_ONGROUND, the problem starts

So, it happens ONLY when SV_Move is used with the entity (called by drop to floor functions)



I've tried to use BSP but I get some crashes (touched bsp with no model errors). Maybe the mins/maxs wasn't relative to map origin.

xPaw 07-13-2010 10:34

Re: Solid entity with negative z origin at spawn
 
Quote:

Originally Posted by joropito (Post 1237670)
I'm going to make a lot of this entities so I prefer to not use any forward.

Wait I found after "a lot" of checks:

- If I put entity with negative Z it works fine.
- If I drop to floor (engine/fakemeta) the problem starts
- If I drop using TOSS + !FL_ONGROUND, the problem starts

So, it happens ONLY when SV_Move is used with the entity (called by drop to floor functions)



I've tried to use BSP but I get some crashes (touched bsp with no model errors). Maybe the mins/maxs wasn't relative to map origin.

BSP can be used with map models (*xx) only afaik

Ive tried to do SOLID_BBOX and MOVETYPE_NONE without any drops or anything, but problem still remains

You think SV_Move is the problem?

joropito 07-13-2010 10:59

Re: Solid entity with negative z origin at spawn
 
Quote:

Originally Posted by xPaw (Post 1237709)
BSP can be used with map models (*xx) only afaik

Ive tried to do SOLID_BBOX and MOVETYPE_NONE without any drops or anything, but problem still remains

You think SV_Move is the problem?

drop to floor functions calls SV_Move.

If I change origin manually (using fmresearch) the problem ends.

Also, if I do some trace(hull/line) to get floor origin and then move the entity, the problem starts.

ot_207 07-13-2010 11:23

Re: Solid entity with negative z origin at spawn
 
Quote:

Originally Posted by joropito (Post 1237734)
drop to floor functions calls SV_Move.

If I change origin manually (using fmresearch) the problem ends.

Also, if I do some trace(hull/line) to get floor origin and then move the entity, the problem starts.

Maybe blocking the touch with the worldspawn may fix the problem. Or you can do something else.
Get the mins and maxs of the entity and do not set the origin of the entity in the floor use the origin + mins[z]. I think that it will work better.

joropito 07-13-2010 14:18

Re: Solid entity with negative z origin at spawn
 
Quote:

Originally Posted by ot_207 (Post 1237758)
Get the mins and maxs of the entity and do not set the origin of the entity in the floor use the origin + mins[z]. I think that it will work better.

I try to understand this part but not :P

I thought you was talking about setting relative origin instead of absolute (like brush entities) but I guess not.

Do you have an example?

ot_207 07-13-2010 14:42

Re: Solid entity with negative z origin at spawn
 
Quote:

Originally Posted by joropito (Post 1237909)
I try to understand this part but not :P

I thought you was talking about setting relative origin instead of absolute (like brush entities) but I guess not.

Do you have an example?

I will explain with vectors then.
PHP Code:

Float:origin[3//User origin
Float:mins[3// The mins of the user
mins mins origin;

// DO the trace to the floor
// we obtain this origin
Float:traceOrg[3]
traceOrg[2]  -= mins;

// Set the new origin 


joropito 07-13-2010 14:48

Re: Solid entity with negative z origin at spawn
 
Quote:

Originally Posted by ot_207 (Post 1237941)
I will explain with vectors then.
PHP Code:

Float:origin[3//User origin
Float:mins[3// The mins of the user
mins mins origin;

// DO the trace to the floor
// we obtain this origin
Float:traceOrg[3]
traceOrg[2]  -= mins;

// Set the new origin 


Ok, I understand.
You want to avoid the trace to touch the entity.

Just to let you know, mins[2] = 0.0 (the origin is not centered)

I'll try to trace from a few units below.


All times are GMT -4. The time now is 07:14.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.