View previous topic :: View next topic |
Author |
Message |
jim

Joined: 05 Aug 2005 Posts: 400 Location: In The Sun
|
Posted: Fri Nov 07, 2008 9:05 pm Post subject: Rotate bounding box |
|
|
Is it possible to rotate the bounding box of some entity? Like rotate the bounding box of the player or some monster? _________________ zbang! |
|
Back to top |
|
 |
Spike
Joined: 05 Nov 2004 Posts: 944 Location: UK
|
Posted: Fri Nov 07, 2008 10:37 pm Post subject: |
|
|
Bounding boxes never rotate.
If player bboxes rotated as players rotated, you'd end up with stuff getting stuck in stuff, or not being able to turn.
A few engines support rotation on SOLID_BSP entities (combined with MOVETYPE_PUSH). But really only on the condition that all rotation is changed with avelocities rather than directly setting angles (or you end up with the issue highlighted above).
You can expand bboxes with rotation... but that tends to break more stuff than it helps, so is certainly not advised.
This is how it works in Q1, Q2, Q3 and Hexen2...
Except that normal Q1 engines don't support rotated physics at all - hipnotic rotations are implemented with multiple non-rotating boxes whos origin revolves around the actual rotating object. _________________ What's a signature? |
|
Back to top |
|
 |
jim

Joined: 05 Aug 2005 Posts: 400 Location: In The Sun
|
Posted: Sat Nov 08, 2008 3:56 am Post subject: |
|
|
Hmm.. ok. It would be ok to not be able to turn. Just imagine crawling in a really low and narrow tunnel. I think it would be really difficult to turn around. But I guess the character would eventually get stuck at something, like a 90 degree turn in the tunnel that's still as wide as it's always been.
Well.. could I add another bounding box follow the object with position based on the angle of the object? This would be used for attacks hitting it, but it hitting some walls wouldn't make the master object stuck. _________________ zbang! |
|
Back to top |
|
 |
|