So, I have this factory, and every thing should be just fine. However, I noticed that the boxes for the per piece collision volumes, which the right size, were well off to one side.
Looked in upspring, and I had set the model center to the big tower thing. I moved it back to 0 and the boxes lined up... Ok weird...
So I take another look in game...
WTF? There is this big red box around everything (and shots impact this box and do no damage to the unit), and then if you look lower there is a short purple box around... nothing.
What the hell is going on?
What am I doing so massively wrong that none of this makes sense?
Unitdef:
https://code.google.com/p/evolutionrts/ ... actory.lua
http://www.imagebam.com/image/cd6d9e174861084
Per piece collision volumes issues
Moderator: Moderators
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: Per piece collision volumes issues
I run into the same issue some time ago. To fix this you need to set modelCenterOffset in the unitDef to the same value as model center in UpSpring. Don't ask me why...Forboding Angel wrote:So, I have this factory, and every thing should be just fine. However, I noticed that the boxes for the per piece collision volumes, which the right size, were well off to one side.
Looked in upspring, and I had set the model center to the big tower thing. I moved it back to 0 and the boxes lined up... Ok weird...
Or alternatively set the model center to 0 like you did.
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: Per piece collision volumes issues
No, you are completely missing the issue. Red box, purple box. There are no pieces that cover that area.
Look at the model in upspring and compare it to the hitboxes. Notice 2 boxes that shouldn't be there?
Look at the model in upspring and compare it to the hitboxes. Notice 2 boxes that shouldn't be there?
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: Per piece collision volumes issues
Ok, found the solution,
Basically, rafal was right about the issue he thought I was talking about.
I had face edited that model to delete half of it. Apparently you need to recalculate the normals in upspring otherwise it still thinks that the parts of the model you deleted are still there. That fixed the boxes issue.
Now the other issue was when I moved the hitsphere around, it moved the collision boxes around. Setting same values in unitdef as in upspring like rafal said fixed that.
Basically, rafal was right about the issue he thought I was talking about.
I had face edited that model to delete half of it. Apparently you need to recalculate the normals in upspring otherwise it still thinks that the parts of the model you deleted are still there. That fixed the boxes issue.
Now the other issue was when I moved the hitsphere around, it moved the collision boxes around. Setting same values in unitdef as in upspring like rafal said fixed that.
- Deadnight Warrior
- Posts: 183
- Joined: 08 Jun 2009, 17:59
Re: Per piece collision volumes issues
Usually you don't need collision volumes for each and every piece, as many overlap.
A good tutorail about collision volumes is on the spring wiki, and a simple but effective way to customize collision volumes is with the Dynamic Collision Volume gadget (don't forget the CV config file).
A good tutorail about collision volumes is on the spring wiki, and a simple but effective way to customize collision volumes is with the Dynamic Collision Volume gadget (don't forget the CV config file).
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: Per piece collision volumes issues
In evo, the models are very highly optimized. That factory that you see only has about 5 actual pieces.
The vast majority of evo models (including mobile units except the all terrains) have 3 pieces or less. Even the All terrain tanks usually only have 11 pieces (or less).
I have gleaned a lot of data about collision volumes and how they + spring work. I'm not going to go into detail right now though as it's an exhaustive list of results and frankly at this very moment, I cba.
The vast majority of evo models (including mobile units except the all terrains) have 3 pieces or less. Even the All terrain tanks usually only have 11 pieces (or less).
I have gleaned a lot of data about collision volumes and how they + spring work. I'm not going to go into detail right now though as it's an exhaustive list of results and frankly at this very moment, I cba.