Voxels cannot support items on top of them

Ask about editing graphics, sounds, models, music, etc here!
Shaders (GLSL) and SNDINFO questions also go here!

Moderators: GZDoom Developers, Raze 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.

Voxels cannot support items on top of them

Postby Deon » Mon Oct 19, 2020 9:37 am

Dear modders.

I am working on a very basic furniture voxel project. I've noticed that if I make a voxel table which blocks players and can be walked on, the items like ammo still fall through it.
I don't see an actor flag to combat that. Have you had a chance to look into it?

User avatar
Deon
 
Joined: 08 Oct 2020

Re: Voxels cannot support items on top of them

Postby Deon » Mon Oct 19, 2020 11:13 am

I came up with a simple workaround for now: I can give 0 gravity to items on top of tables:



However it would be nice if there is a proper way to do it, i.e. to have stuff on top of furniture in elevators.
User avatar
Deon
 
Joined: 08 Oct 2020

Re: Voxels cannot support items on top of them

Postby Cherno » Mon Oct 19, 2020 1:20 pm

Wether an actor is represented by voxels, sprites, and models doesn't matter as far as collision is concered; you might want to post your actor code. Have you tried adding the ACTLIKEBRIDGE flag to the table?
User avatar
Cherno
 
Joined: 06 Dec 2016

Re: Voxels cannot support items on top of them

Postby Deon » Mon Oct 19, 2020 1:42 pm

No, thank you, I will try that next.

I have another a bit irrelevant question: are the actors possible in a radial (well square) shape only when it concens the "blocking" box? I mean, there's radius, and not X/Y. Does it mean that I can't make a proper 32x64 desk, and I need to "build" it from 2 voxels to have proper geometry?
User avatar
Deon
 
Joined: 08 Oct 2020

Re: Voxels cannot support items on top of them

Postby Deon » Mon Oct 19, 2020 2:13 pm

Yep, ACTLIKEBRIDGE did the trick, thank you!



You saved me a lot of time and headache.
User avatar
Deon
 
Joined: 08 Oct 2020

Re: Voxels cannot support items on top of them

Postby Cherno » Mon Oct 19, 2020 9:20 pm

Deon wrote:No, thank you, I will try that next.

I have another a bit irrelevant question: are the actors possible in a radial (well square) shape only when it concens the "blocking" box? I mean, there's radius, and not X/Y. Does it mean that I can't make a proper 32x64 desk, and I need to "build" it from 2 voxels to have proper geometry?


All actors have quadrangular collision boxes with their length and width defined by the radius property (radius * 2) and their heigth defiend by... height. These boxes will also not rotate with the actor, but rather be oriented along the world xy axis at all times.

To make non-box-shaped actors have proper collisions, you either split the model into two, or have the main actor be visible as the complete model, and then spawn invisible actors that only serve as colliders, which are offset and move with it. Of coruse, since these hitbox actors won'T rotate around themselves, you are still limited in the way the visible actor can be rotated.
Last edited by Cherno on Tue Oct 20, 2020 3:58 am, edited 1 time in total.
User avatar
Cherno
 
Joined: 06 Dec 2016

Re: Voxels cannot support items on top of them

Postby Deon » Tue Oct 20, 2020 2:20 am

A cool idea with the spawning of invisible actors, I will explore it. I really appreciate your help! Thank you.
User avatar
Deon
 
Joined: 08 Oct 2020


Return to Assets (and other stuff)

Who is online

Users browsing this forum: No registered users and 0 guests