Rotate bounding box
Moderator: InsideQC Admins
3 posts
• Page 1 of 1
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!
-

jim - Posts: 599
- Joined: Fri Aug 05, 2005 2:35 pm
- Location: In The Sun
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.
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.
- Spike
- Posts: 2892
- Joined: Fri Nov 05, 2004 3:12 am
- Location: UK
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.
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!
-

jim - Posts: 599
- Joined: Fri Aug 05, 2005 2:35 pm
- Location: In The Sun
3 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest