Quads & Collisions
-
- Posts: 3
- Joined: Mon May 16, 2011 10:01 am
Quads & Collisions
Hello, dev community! =)
I'm working on the example "lesson10b" of "examples/3D/nehe", I've modified world.txt, and created some quads, but now I want to add collision events to these quads. How can I do that? (I'm a beginner^^)
Thanks in advance for your help
I'm working on the example "lesson10b" of "examples/3D/nehe", I've modified world.txt, and created some quads, but now I want to add collision events to these quads. How can I do that? (I'm a beginner^^)
Thanks in advance for your help
-
- Posts: 85
- Joined: Mon Sep 27, 2010 5:26 pm
Re: Quads & Collisions
Do you mean when the player (in this case it's just the camera) collides with the quads...?
Re: Quads & Collisions
this is not really a libnds questions. there are numerous articles to be found on the web that describe different approaches to collision detection. take a look around on the web and then come back if you have specific problems implementing something on the ds.
-
- Posts: 85
- Joined: Mon Sep 27, 2010 5:26 pm
Re: Quads & Collisions
Well I think you could compare the coordinates of the polygons of the quads with the player's coordinates!
For the events you can add some bools which disable walking arround. You also can code a hitbox for the player!
Do you need the source or do you want to try it yourself?
For the events you can add some bools which disable walking arround. You also can code a hitbox for the player!
Do you need the source or do you want to try it yourself?
-
- Posts: 3
- Joined: Mon May 16, 2011 10:01 am
Re: Quads & Collisions
The source will be helpful, thanks =D I've tried a lot of things but nothing works correctly
-
- Site Admin
- Posts: 2003
- Joined: Tue Aug 09, 2005 3:21 am
- Location: UK
- Contact:
Re: Quads & Collisions
Show us what you've tried.
You'll learn much more from trying things and having others point out where you went wrong than from just using someone else's code.
You'll learn much more from trying things and having others point out where you went wrong than from just using someone else's code.
-
- Posts: 84
- Joined: Sun Apr 11, 2010 10:43 am
Re: Quads & Collisions
Learn:
Cross Product (Needed for fast "inside" triangle tests )
Dot Product + Plane Equation (Needed for quad/tri to point collisions modelling)
Cross Product (Needed for fast "inside" triangle tests )
Dot Product + Plane Equation (Needed for quad/tri to point collisions modelling)
-
- Posts: 85
- Joined: Mon Sep 27, 2010 5:26 pm
Re: Quads & Collisions
Good idea WinterMute!Show us what you've tried.
Just show us wath you 've tried then we will help you, okay?
Who is online
Users browsing this forum: Ahrefs [Bot] and 0 guests