Gamestudio Links
Zorro Links
Newest Posts
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (AndrewAMD, Akow, 1 invisible), 1,499 guests, and 11 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19058 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Colliding a Rectangular shaped Entity #205657
05/07/08 20:09
05/07/08 20:09
Joined: Aug 2007
Posts: 286
DestroyTheRunner Offline OP
Member
DestroyTheRunner  Offline OP
Member

Joined: Aug 2007
Posts: 286
Hi

I have a rectangular entity(eg. a car , 64x32).

It moves by C_move and C_rotate and uses OBB and 'c_setminmax(me);' set!

The problem is that when it collides with something, it looks like
uses a ellipsoid hull and not as a real rectangular box!

The front, back and sides collides perfectly but in the corners it goes inside the wall or entity before colliding.

How can i make my box/car or whatever collide perferctly by its dimensions without the edges/corners going inside the walls?

thanks in advance!

Re: Colliding a Rectangular shaped Entity [Re: DestroyTheRunner] #205788
05/08/08 20:38
05/08/08 20:38
Joined: Aug 2007
Posts: 286
DestroyTheRunner Offline OP
Member
DestroyTheRunner  Offline OP
Member

Joined: Aug 2007
Posts: 286
anyone?

Re: Colliding a Rectangular shaped Entity [Re: DestroyTheRunner] #206253
05/12/08 12:26
05/12/08 12:26
Joined: Aug 2007
Posts: 286
DestroyTheRunner Offline OP
Member
DestroyTheRunner  Offline OP
Member

Joined: Aug 2007
Posts: 286
??

Re: Colliding a Rectangular shaped Entity [Re: DestroyTheRunner] #206287
05/12/08 19:06
05/12/08 19:06
Joined: Sep 2003
Posts: 733
Whitefish, Montana
JazzDude Offline
User
JazzDude  Offline
User

Joined: Sep 2003
Posts: 733
Whitefish, Montana
If you haven't already looked, hit F11 twice to see the bounding box. Maybe you can fix it by changing Use_box or use_AABB.

You can also change it by setting the dimensions in the car's action.

Look at the model in MED and check the dimensions at the bottom of the screen.
As you move the cursor to the front or back of the car you'll see a plus number and a minus number.

In the action, add:

my.fat = on; //you have to use both fat and narrow
my.narrow = on;
wait(1); // wait 1 frame after creation
vec_set(my.min_x,vector(-50,-50,-50)); //x,y,z negatives
vec_set(my.max_x,vector(50,50,50)); //x,y,z positives

Hope that helps.

Re: Colliding a Rectangular shaped Entity [Re: JazzDude] #206300
05/12/08 20:29
05/12/08 20:29
Joined: Sep 2004
Posts: 130
Italy
Alessandro Offline
Member
Alessandro  Offline
Member

Joined: Sep 2004
Posts: 130
Italy
Just a hint: if you do not want to physics engine, you could make a check of the rectangle distance from the ground to each corner (by code), then you could even simulate shocks and springs!

Re: Colliding a Rectangular shaped Entity [Re: Alessandro] #206662
05/14/08 21:25
05/14/08 21:25
Joined: Aug 2007
Posts: 286
DestroyTheRunner Offline OP
Member
DestroyTheRunner  Offline OP
Member

Joined: Aug 2007
Posts: 286
alright guys... IŽll perform those tests tomorrow.

thanks


Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1