3D Game Needs Collision Detection
3D Game Needs Collision Detection
3D Game Needs Collision Detection
3D Game Needs Collision Detection
3D Game Needs Collision Detection
3D Game Needs Collision Detection 3D Game Needs Collision Detection 3D Game Needs Collision Detection 3D Game Needs Collision Detection 3D Game Needs Collision Detection 3D Game Needs Collision Detection 3D Game Needs Collision Detection 3D Game Needs Collision Detection
3D Game Needs Collision Detection 3D Game Needs Collision Detection
3D Game Needs Collision Detection
Go Back  Xtreme Visual Basic Talk > > > > 3D Game Needs Collision Detection


Reply
 
Thread Tools Display Modes
  #1  
Old 09-03-2005, 07:56 PM
Zeth Zeth is offline
Newcomer
 
Join Date: Aug 2005
Posts: 3
Default 3D Game Needs Collision Detection


'****************************************************************
'================================================================
'This 3D Game engine has been stripped of many of its features
'The purpose of this game engine is for progammers to use in order
'to find a way to get mesh collision detection to work.
'I have played with the collision detection and so far cannot get it
'to work properly. If anyone can gain the collision detection please
'notify me at ZAERep@Yahoo.com or ZAERep@Google.com

'This Engine is Copyright 2005 Zeth Anul EnterpriZe
'this engine should be used only for the purpose stated above, abuse
'of the use of this engine will result in legal action. Permissions
'may be gained from the author of this code at ZAERep@Yahoo.com or ZAERep@Google.com

'All code is Copyright Lucas S. Morales 2005 and Zeth Anul EnterpriZe 2005

'Any one who can gain the collision detection to work will be
'recognized within this project.

'Copyright 2005 Zeth Anul EnterpriZe and Lucas S. Morales
'===============================================================
'****************************************************************

Be warned that alot of feature have been stripped from the engine. Such things as fustrum view, and camera modes. The code provided is only the most basic use to gain collision detection. THe code is made for Windows XP, and was coded in Microsoft VisualStudio.Net in VB.Net. It uses the DirectX 9.0 April update. So if anyone can work on this code please keep reading.

HELP!


Please if any one can help me I will be most greatful. I need a player mesh to collide with a world mesh. You see, I cannot get the collision detection to work properly in this 3D engine. I have somehow got the camera to collide and the player, but only with small meshes. It doesn't seem to want to collide with the world mesh.

This is what I have previously used:

Public Sub Intersect()
Dim Near As Vector3
Dim Far As Vector3
Dim Closest As IntersectInformation
Near = New Vector3(Temp.Position.Location.X, 0, Temp.Position.Location.Z)
Far = New Vector3(Temp.Position.Direction.X, 0, Temp.Position.Location.Z)


Near.Unproject(device.Viewport, device.Transform.Projection, device.Transform.View, device.Transform.World)
Far.Unproject(device.Viewport, device.Transform.Projection, device.Transform.View, device.Transform.World)


If Temp.TempPlayer.SystemMesh.Intersect(Near, Far, Closest) Then
DebugText += "Hit!"
device.RenderState.FillMode = FillMode.WireFrame 'to absoulutely make sure that the collision happened
Else
device.RenderState.FillMode = FillMode.Solid
End If
End Sub

This has allowed the camera to collide if another tempPlayer is made and place somewhere in the world. (To do so, the most simple way is to just copy the tempplayer class and change the starting x,y,z coordinets.) To call it just place a Intersect() function call in Protected Overrides Sub FrameMove().

However, what i would like is for the player mesh (the player controlled one) to collide into the walls of the mesh. I have included some other mesh samples, if you want to expirement simply change the mesh name (make sure the name is in the media folder).

I would like to get the physics of this engine really really good, so that would require alot of other factors, I am aware. But I think that the first step is just collision detection.

If anyone can help me, we will be more the pleased to include your name on the project. Please just contact me at ZAERep@Yahoo.com or ZAERep@Google.com if you would like to help us.


Edit by Shurik:
Please reattach the code without executables
Thanks


I do not understant-- which executables am I to remove?
Attached Files
File Type: zip Copy of TestRPG.zip (1.92 MB, 31 views)

Last edited by Zeth; 09-04-2005 at 10:44 AM.
Reply With Quote
  #2  
Old 09-09-2005, 11:51 PM
StressedGeezer's Avatar
StressedGeezer StressedGeezer is offline
Junior Contributor
 
Join Date: Apr 2004
Location: Cambridge, England
Posts: 259
Default

The moderators must have found your project's executable within the zip file - you'd need to remove it. The forum rules state that no executables are to be posted.
__________________
Geezer
Reply With Quote
  #3  
Old 09-18-2005, 07:12 PM
sgt_pinky's Avatar
sgt_pinky sgt_pinky is offline
Contributor
 
Join Date: Feb 2004
Location: Melbourne, Australia
Posts: 633
Default

Why don't you use a physics SDK that has collision, like James Raine's port of ODE to .NET

ODE.NET homepage

It is very simple to use, and has full support for physics and collision of Tria meshes.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
3D Game Needs Collision Detection
3D Game Needs Collision Detection
3D Game Needs Collision Detection 3D Game Needs Collision Detection
3D Game Needs Collision Detection
3D Game Needs Collision Detection
3D Game Needs Collision Detection 3D Game Needs Collision Detection 3D Game Needs Collision Detection 3D Game Needs Collision Detection 3D Game Needs Collision Detection 3D Game Needs Collision Detection 3D Game Needs Collision Detection
3D Game Needs Collision Detection
3D Game Needs Collision Detection
 
3D Game Needs Collision Detection
3D Game Needs Collision Detection
 
-->