NOBLOCKMAP unclear description

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Post Reply
Kzer-Za
Posts: 509
Joined: Sat Aug 19, 2017 11:52 pm
Graphics Processor: nVidia (Modern GZDoom)

NOBLOCKMAP unclear description

Post by Kzer-Za »

Could somebody please explain what exactly does this flag mean? "This object is excluded from passive collision detection. Nothing else can run into a NOBLOCKMAP object but the object itself can run into others." I can't make any sense of it. Does it mean that an actor with this flag collides with another actor only if another actor has greater velocity? How is it determined which of them ran into which? Can it collide with level architecture?
User avatar
phantombeta
Posts: 2088
Joined: Thu May 02, 2013 1:27 am
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia with Vulkan support
Location: Brazil

Re: NOBLOCKMAP unclear description

Post by phantombeta »

Collision in the Doom engine is done per actor, by adding the `vel` vector to the actor's position, then checking for collisions against any actors in that new position*.
This is done in each actor's `Tick` virtual. The "blockmap" referred to in the flag's name is a grid of fixed-size squares in the XY axis which contains the actors that overlap that block. This is used to find collidable actors to speed up collision checking, and setting that flag means the actor won't be added to it, so other actors won't be able to check for collision against it after moving.
But an actor doesn't need to be in the blockmap to check for collision against others, so the actor with NOBLOCKMAP will still collide with others when it's performing its own movement.

Hopefully this explanation is clear enough.

* (It actually splits the movement into "steps" first to avoid "tunneling" through walls and other actors, but the way it works is still the same)
Kzer-Za
Posts: 509
Joined: Sat Aug 19, 2017 11:52 pm
Graphics Processor: nVidia (Modern GZDoom)

Re: NOBLOCKMAP unclear description

Post by Kzer-Za »

Thanks!
User avatar
determin1st
Posts: 57
Joined: Wed Oct 06, 2021 11:23 am
Contact:

Re: NOBLOCKMAP unclear description

Post by determin1st »


watched this, to get some info.. it's that G thing..
Post Reply

Return to “Scripting”