Click here to Skip to main content
15,887,135 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hello Dears;


I'm coding a 3D software and I use Xna. I need know about this Question:


How to import a 3D wall in XNA? (I designed it in SolidWork software)

How to detect collisions between Balls and Wall's elements in 3D environment?



I'll be very glad to hear your opinion and suggestions about it.
Sincerely Your's
Posted
Updated 12-Mar-13 19:58pm
v2

1 solution

Quote:
How to import a 3D wall in XNA? (I designed it in SolidWork software )

I would Google[^] for that.

Quote:
How to detect collisions between Balls and Wall's elements in 3D environment?

A 3D ball collides with a wall if its dinstance from the wall is less than or equal to its radius. For instance for a wall at X position xWall, with infinite Y-Z dimensions you have to check:
C++
|xBall - xWall| <= rBall
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 15-Mar-13 14:49pm    
Fair enough, a 5. I already removed one OP's answer; look at other questions...
OP is recommended to review the rules for asking questions.
—SA
CPallini 15-Mar-13 16:09pm    
Thank you.
Sergey Alexandrovich Kryukov 15-Mar-13 16:23pm    
By the way, last formula in your answer is pretty nice.
As I understand, each | represents a vertical wall, and <= represents the direction of the ball motion, right? Only I don't understand why do you depict a ball moving from right. Does it represent the pitch, or you simply did not have enough room to show a ball inside? :-)
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900