Meaning of MOVETYPE_s and SOLID_s
Moderator: InsideQC Admins
5 posts
• Page 1 of 1
Meaning of MOVETYPE_s and SOLID_s
I think that MOVETYPE_ affects several parameters : whether collides with world, whether collides with monsters (and players), whether gravity is simulated and whether bouncing is simulated. SOLID_ affects whether blocked() or touched() is called. Is it correct?
There are several MOVETYPE_ and SOLID_. What is each kind used for and when to use it?
I wanted to make some simple rope physics and i am not sure which to choose.
Thanks for help.
There are several MOVETYPE_ and SOLID_. What is each kind used for and when to use it?
I wanted to make some simple rope physics and i am not sure which to choose.
Thanks for help.
-

daemonicky - Posts: 185
- Joined: Wed Apr 13, 2011 1:34 pm
movetype affects how it moves and what stops it
solid affects what it stops
note that an ent which is not solid will generally not touch things that are not, so there's an overlap there.
most of the movetypes are basically the same. there's no difference between noclip/step/fly/toss/bounce until its affected by gravity or actually hit something.
if you want simple rope physics, use movetype_fly and solid_slidebox or whatever it is.
do the gravity and velocity changes in a think function and aproximate the swing, ignore the actual origin until you hit an object, otherwise use it only to propell the entity to the 'target' position that it should be at a fraction of a second's time.
if it touches something, bounce it off.
alternatively, use movetype_none and do all the moves yourself with tracebox. This will allow 'stepping' while swinging, if you care about that.
none of the builtin movetypes will give appropriate physics. movetype_fly will at least do collisions and impacts without gravity, but won't step (movetype_step won't step either).
solid affects what it stops
note that an ent which is not solid will generally not touch things that are not, so there's an overlap there.
most of the movetypes are basically the same. there's no difference between noclip/step/fly/toss/bounce until its affected by gravity or actually hit something.
if you want simple rope physics, use movetype_fly and solid_slidebox or whatever it is.
do the gravity and velocity changes in a think function and aproximate the swing, ignore the actual origin until you hit an object, otherwise use it only to propell the entity to the 'target' position that it should be at a fraction of a second's time.
if it touches something, bounce it off.
alternatively, use movetype_none and do all the moves yourself with tracebox. This will allow 'stepping' while swinging, if you care about that.
none of the builtin movetypes will give appropriate physics. movetype_fly will at least do collisions and impacts without gravity, but won't step (movetype_step won't step either).
- Spike
- Posts: 2892
- Joined: Fri Nov 05, 2004 3:12 am
- Location: UK
MOVETYPE and SOLID are confusing to me.
I'd rather have something like a bitfield and use it that way
movetype = MOVE_WITH_GRAVITY | MOVE_BOUNCE_OFF_WALS | MOVE_TROUGH_WALLS | MOVE_TROUGH_MONSTERS
solid = STOP_MONSTERS|STOP_BRUSHES ...
But thank you very much.
movetype = MOVE_WITH_GRAVITY | MOVE_BOUNCE_OFF_WALS | MOVE_TROUGH_WALLS | MOVE_TROUGH_MONSTERS
solid = STOP_MONSTERS|STOP_BRUSHES ...
But thank you very much.
-

daemonicky - Posts: 185
- Joined: Wed Apr 13, 2011 1:34 pm
If I understand it correctly, then you set movetype and solid so that physics engine can simulate some type of movement. Parameters imply
- whether it moves at all
- which classes of entity can (not) pass trough (world, monsters ... neither, both, either),
- which class can (not) pass trough it (world, monsters ...)
- and whether object smoothly moves over monsters or stairs .
Entity with SOLID_NONE and SOLID_TRIGGER can pass trough everything;
but SOLID_BBOX, SOLID_SLIDEBOX and SOLID_BSP can pass trought nothing.
Parameter MOVETYPE_NONE does not moves on itself, but other do;
MOVETYPE_FLY ingores gravity, everything else doesn't;
MOVETYPE_NOCLIP passes trough walls and monsters, everything else doesn't;
MOVETYPE_PUSH passes trough walls and ignores gravity;
MOVETYPE_BOUNCE bouncess of walls.
Are not MOVETYPE_WALK, MOVETYPE_STEP and MOVETYPE_TOSS the same thing, but TOSS does not try to remain on ground? And STEP is special only by trying to make view position not jump. Thinking about it, bullets probably dont stairwalk, so WALK and STEP automatically step if step is small enough whereas TOSS does not. So is this the only difference (and WALK smooths movement of view positions so it does not jumps suddenly when there is step)?
Are MOVETYPE_ANGLENOCLIP and MOVETYPE_ANGLECLIP ever used?
- whether it moves at all
- which classes of entity can (not) pass trough (world, monsters ... neither, both, either),
- which class can (not) pass trough it (world, monsters ...)
- and whether object smoothly moves over monsters or stairs .
Entity with SOLID_NONE and SOLID_TRIGGER can pass trough everything;
but SOLID_BBOX, SOLID_SLIDEBOX and SOLID_BSP can pass trought nothing.
Parameter MOVETYPE_NONE does not moves on itself, but other do;
MOVETYPE_FLY ingores gravity, everything else doesn't;
MOVETYPE_NOCLIP passes trough walls and monsters, everything else doesn't;
MOVETYPE_PUSH passes trough walls and ignores gravity;
MOVETYPE_BOUNCE bouncess of walls.
-

daemonicky - Posts: 185
- Joined: Wed Apr 13, 2011 1:34 pm
Im pretty sure movetype walk is for clients and step is for enemies. i think i got it backwards tho
http://gitorious.org/nexuiz/darkplaces/ ... ensions.qc
MOVETYPE_PHYSICS, SOLID_SPHERE, and a bunch of other yummy things in this dpextensions.qc it's listed as experimental, tho. i would try it but i don't hav access to my computer atm
http://gitorious.org/nexuiz/darkplaces/ ... ensions.qc
MOVETYPE_PHYSICS, SOLID_SPHERE, and a bunch of other yummy things in this dpextensions.qc it's listed as experimental, tho. i would try it but i don't hav access to my computer atm
-

behind_you - Posts: 237
- Joined: Sat Feb 05, 2011 6:57 am
- Location: Tripoli, Libya
5 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest