Bounding Box normals
Sorry, this is probably pretty simple, but so far I''ve based inter-object collisions on bounding boxes and I want to create a slide effect if I collide with something. To do this I need the normal of whatever side of the box I hit. How do I find this? Thanks
When they come for me I''ll be sittin'' in my desk with a gun in my hand wearing a bullit-proof vest singing "My, my, my, how the time does fly when you know your gonna die by the end of the night!"
If you using axis-aligned bounding boxes or oriented bounding boxes? If they''re axis aligned then the normals are just the basis vectors or their negations, ie (1,0,0) (-1,0,0) (0,1,0) (0,-1,0) (0,0,1) (0,0,-1). If you''re using bounding boxes oriented to the object''s local space then it''s a bit more complicated, you need to transform those basis vectors back into world space coordinates.
And if it''s not Axis aligned, but the world coordinates of the oriented box are known (they should be, how else do you compare)
it''s not that hard either.
Each normal is parallel to 4 edges of the box.
---------------------------
I may be getting older, but I refuse to grow up
it''s not that hard either.
Each normal is parallel to 4 edges of the box.
---------------------------
I may be getting older, but I refuse to grow up
I may be getting older, but I refuse to grow up
I assumed you read other posts of the same nature. Since you didn''t -this- is the link to a post which still keeps on page 1 of this board. And by chance it''s just what you need
---------------------------
I may be getting older, but I refuse to grow up
---------------------------
I may be getting older, but I refuse to grow up
I may be getting older, but I refuse to grow up
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement