- Forums
- Forum Help
- Search Forum
- Login
- Register
Truevision3D
>>
Game Development
>>
Game Development
(Moderators:
Waterman
,
Mithrandir_
,
beyonder
,
ZaPPZion
) >>
Collision Detection
Pages: [
1
]
« previous
next »
Print
Author
Topic: Collision Detection (Read 649 times)
CodeNinja
Community Member
Posts: 5
Collision Detection
«
on:
September 13, 2011, 05:10:05 AM »
Hi there,
I just need a brief overview of how the collision detection works exactly and check if I understand correctly:
1) The engine uses ray detection, thus you have to check for collisions from all possible angles? For example, down, up, left right etc?
2) Does the ray start from the center of the mesh?
3) do I use the collision test function in the scene class or mesh class? What is the difference? Both methods collide with the mesh that I'm trying to check collisions with. (it collides with itself)
Thanks for any tips, it will be appreciated!
ps: the scenario I'm testing this code with:
I have a mesh that I created with the "addfloor" function and I have a sphere mesh.
The "floor" mesh is registered with the physics engine as a static mesh body and the sphere is a static body. It works great when the physics get applied. The sphere collides and rolls etc. The goal here is to determine the collision impact point of the sphere and the static mesh once they collide.
Logged
while(true){{waxOn(); waxOff();}}
CodeNinja
Community Member
Posts: 5
Re: Collision Detection
«
Reply #1 on:
September 13, 2011, 08:06:50 AM »
any ideas guys?
No code needed, just point me in the right direction.
Thanks!
Logged
while(true){{waxOn(); waxOff();}}
Mithrandir
Community Member
Posts: 325
Re: Collision Detection
«
Reply #2 on:
September 13, 2011, 03:49:30 PM »
1)
If you want to cover larger area using ray collision that is exactly what you would do.
You can try the collision test in the physics class to test for collisions between convex hulls, static meshes and/or primitives.
2)
You have to specify the start and end point of the ray. You can make it the centre of the mesh but that is completely up to you.
3) The mesh class function test only the against that mesh. The scene class function tests against all meshes that have collision checking enabled (Terrains, actors, etc. too).
PS
This makes the above points obsolete: after a physics collision you can iterate through collision events and obtain the impact point, normal, ... . No further collision detection is needed. Just remember to enable collision events for the physics material/body.
Logged
CodeNinja
Community Member
Posts: 5
Re: Collision Detection
«
Reply #3 on:
September 14, 2011, 02:16:16 AM »
Awesome Mithrandir,
It seems I need to study the physics object model more deeply.
TV3D makes it even more easier than I expected, great piece of software.
Thanks again, I'll do some homework
Logged
while(true){{waxOn(); waxOff();}}
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Truevision3D Official Information
-----------------------------
=> Development Information
-----------------------------
TV3D SDK
-----------------------------
=> TV3D SDK 6.3
===> Bugs
-----------------------------
Game Development
-----------------------------
=> Game Development
-----------------------------
Projects
-----------------------------
=> In-Development
=> Showcase
=> Recruitment
=> Announcements
-----------------------------
Truevision3D Official Information
-----------------------------
=> News and Announcements
-----------------------------
TV3D SDK
-----------------------------
=> TV3D SDK 6.5
-----------------------------
Game Development
-----------------------------
=> Engine Comparison
-----------------------------
TV3D SDK
-----------------------------
===> Shader Development
===> Content Pipeline
===> Bugs
-----------------------------
Game Development
-----------------------------
=> Companion Tools
=> Design and Theory
Powered by SMF 1.1.3
|
SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks