GLBasic forum

Main forum => GLBasic - en => Topic started by: MrTAToad on 2011-Aug-19

Title: 3D Collision
Post by: MrTAToad on 2011-Aug-19
I've noticed that areas of my AC3D graphics dont produce a collision - my sphere goes straight through a solid object.

I also found that moving the X_COLLISION statement until everything has been rendered, collision detection is always active  :blink:

Its probably because I haven't got used to it yet :)

It looks like I have solved it - the object id is the ID of the shape you want collision to be performed on, but the X, Y and Z values are for the object that will be causing the collision :

Code: (glbasic) [Select]
col%=X_COLLISION(self.course[arrayPos%].objectID%,0, _
4.0, _

Just need to get the shape to detect the right object now :)
Title: Re: 3D Collision
Post by: mentalthink on 2011-Aug-20
Hi MrTatoad, well about the collisions in 3D, I use another mode, just because the game in view in only camera position.

I make the 3d Collisions whit 2D Sprites, I put an Sprite in the same pos of the 3D object, and whit a similar measure, and make a simple 2d collision whit Box or Pixel Perfect Collision.

I don´t stay very sure, but I think it´s more speedest for calculate, than a real 3D collision, how I say I don´t be sure about this, but I think by logic a 2D collision needs less calculation than 3d, no?¿.

This it´s only for a fixed camera, but if can be made work whit animated camera, ok, needs a little more work.

Perhaps the trouble whit the 3B object it´s something about the expoter of AC3d, I go to try something whit 3ds MAX, and I tell you here!!!   ;)

Kinds regard,