Box collision problems
Blitz3D Forums/Blitz3D Beginners Area/Box collision problems
| ||
Hi, I've got sphere to box collision problems. I rotate my box and position it after a call to entitybox and the collision area appears to be stuck where it used to be? |
| ||
I don't think collision boxes are rotatable. They have to be axis aligned, I think. You could always use a proxy mesh (cube) and do collisions against that, instead, using sphere-to-poly collisions. As a cube is only 12 tris, it should be plenty fast enough. |
| ||
The collision box does rotate with the entity automatically. Perhaps if you post some code, someone will be able to shed some light. |
| ||
UpdateWorld() ? |
| ||
The collision box does rotate with the entity automatically. Perhaps if you post some code, someone will be able to shed some light. Ah good so long as they can be rotated and positioned after being applied. I'll blame my own code and take a further look. |
| ||
Using positionentity does actually envoke collision detection as it moves the entity from 0,0,0 to the new position. To prevent this use hideentity before positioning and showentity after or use ResetEntity after positioning. Stevie |
| ||
Thank you steve, lots of tricky little gotchas. |
| ||
Yip, I gave up on my first racing game as a result of that one ... couldn't figure out why the wheels started under the track while the car on top ... eventually figured it out though ;) p.s I don't think box collisions rotate with the entity .. may be wrong. Remember to define entity box correctly. A box of 2x2x2 should be defined as entitybox MyBox, -1,-1,-1,2,2,2. |
| ||
it's all sort of working -- and they work rotated, surprisingly! thanks for help everyone. |