Welcome Guest [Log In] [Register]
We hope you enjoy your visit.


You're currently viewing the Ultimate 3D Community as a guest. This means that you can only read posts, but can not create posts or topics by yourself. To be able to post you need to register. Then you can participate in the community active and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.

Join our community!

If you are already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
Terrain Help
Topic Started: Mar 3 2009, 12:53 PM (647 Views)
Deleted User
Deleted User

Hi Guys!!!

I've started working on an FPS using U3D and have encountered a problem, simply I can't figure out how to do collision checking, so I wondered if anybody could tell me a good (and easy) way of making 3D terrain and collision checking so you walk on it and don't go through it. I haven't had much experience with 3D but have done quite a lot using Standard Game Maker so I can understand slightly complex stuff!


Any helps would be nice.

Cheers, Bez!
Quote Post Goto Top
 
Despellanion
Member Avatar
Forum God
[ *  *  *  *  *  * ]
BezZeMad
Mar 3 2009, 12:53 PM
Hi Guys!!!

I've started working on an FPS using U3D and have encountered a problem, simply I can't figure out how to do collision checking, so I wondered if anybody could tell me a good (and easy) way of making 3D terrain and collision checking so you walk on it and don't go through it. I haven't had much experience with 3D but have done quite a lot using Standard Game Maker so I can understand slightly complex stuff!


Any helps would be nice.

Cheers, Bez!
Check the examples in tutorials section both here and on the U3D website. There's a lot about collisions.
Offline Profile Quote Post Goto Top
 
MysteriXYZ
Member Avatar
Master Matrix Masher
[ *  *  *  *  *  * ]
BezZeMad
Mar 3 2009, 12:53 PM
Hi Guys!!!

I've started working on an FPS using U3D and have encountered a problem, simply I can't figure out how to do collision checking, so I wondered if anybody could tell me a good (and easy) way of making 3D terrain and collision checking so you walk on it and don't go through it. I haven't had much experience with 3D but have done quite a lot using Standard Game Maker so I can understand slightly complex stuff!
Hi BezZeMad ^_^ .

To learn about collision checking, see the Collision Management Example from ultimate3d org, and my adaptations thereof.
U3D is like candy; after extensive consumption, it's Best to brush.
Offline Profile Quote Post Goto Top
 
Deleted User
Deleted User

Hi if anyone reads this at all I will give you a bit more info on what I'm tying to do:-

1. Use the terrain renderer for my terrain (You know height maps).

2. Use collision checking to make the camera walk over the terrain.

3. Use a system that doesn't make the camera slowly slide down hills (apart from the VERY!! steep ones)

4. Make it slower for the camera to climb up steep hills.

any more help would be great guys!!!

THX, Bez
Quote Post Goto Top
 
Despellanion
Member Avatar
Forum God
[ *  *  *  *  *  * ]
BezZeMad
Mar 30 2009, 03:11 PM
Hi if anyone reads this at all I will give you a bit more info on what I'm tying to do:-

1. Use the terrain renderer for my terrain (You know height maps).

2. Use collision checking to make the camera walk over the terrain.

3. Use a system that doesn't make the camera slowly slide down hills (apart from the VERY!! steep ones)

4. Make it slower for the camera to climb up steep hills.

any more help would be great guys!!!

THX, Bez
All that is explained in the "Fire and water" demo and the U3D Tech demo.
Offline Profile Quote Post Goto Top
 
Sothh
Member Avatar
Shaman Of Time
[ *  *  *  *  *  * ]
Well guys, this guy eather doesent want to see the examples or he doest under stand them.

Here is a simple collision dection system for terrain.

Put this in the create event for the camera object:

hip_height=7;
minimal_level_distance=10;
wathingheight=15
view = 90
sped = 1.5
fall = 0.5
falling_speed=0
z = 100
height = 5
gravitation = 0.05
follow = 0
distance = 10
perspective = 0
min_range = 0
max_range = 10000
speed2=2

mygravity=0.2;
meh_z=z;
zspeed=0;
sz=z


Then put this into the step event of the camera object:



GetMousePos();
//Mousecontrol
rotx+=(global.mouse_y-display_get_height()/2)*.2;
if(rotx<-90)
rotx=-89;
if(rotx>70)
rotx=69;
roty+=(global.mouse_x-display_get_width()/2)*.2;
SetMousePos(display_get_width()/2,display_get_height()/2)
zprevious=z

//====================================================================
// Check for a collision below the character

distance_down=CheckRayIntersection(terrain.id,x,y,z+hip_height,90,0)


meh_z=z-(distance_down-hip_height);

if z<=z-(distance_down-hip_height) then {
z=z-(distance_down-hip_height)
}

with(obj_wereld)
{
global.level_distance=CheckRayIntersection(id,YOURCAMERA.x,YOURCAMERA.y,YOURCAMERA.z+YOURCAMERA.height,YOURCAMERA.rotx,YOURCAMERA.roty);

if(global.min_distance>global.level_distance)
{
global.min_distance=global.level_distance;
}

}

Please note: I did not creat this code, I updated it for the latest virsion of U3D.

“You can’t outrun Death forever.
But you can make the Bastard work for it.”

Major Korgo Korgar
“Last of The Lancers” - AFC 32
(Andromeda Ascendant Record Database)
Offline Profile Quote Post Goto Top
 
Sothh
Member Avatar
Shaman Of Time
[ *  *  *  *  *  * ]
Here is an example I made:

Terrain Example

Please look at it, I have dial-up internet and it took 30 mins to upload.

“You can’t outrun Death forever.
But you can make the Bastard work for it.”

Major Korgo Korgar
“Last of The Lancers” - AFC 32
(Andromeda Ascendant Record Database)
Offline Profile Quote Post Goto Top
 
Despellanion
Member Avatar
Forum God
[ *  *  *  *  *  * ]
fwbeaver13
Mar 30 2009, 06:01 PM
I have dial-up internet and it took 30 mins to upload.

Whoa, people still use that? :blink: Dude, I feel sorry for you, I really do :lol:
Edited by Despellanion, Mar 30 2009, 06:15 PM.
Offline Profile Quote Post Goto Top
 
Sothh
Member Avatar
Shaman Of Time
[ *  *  *  *  *  * ]
Despellanion
Mar 30 2009, 06:11 PM
fwbeaver13
Mar 30 2009, 06:01 PM
I have dial-up internet and it took 30 mins to upload.

Whoa, people still use that? :blink: Dude, I feel sorry for you, I really do :lol:
IF YOU ONLY NEW!

I live out in the MIDDLE OF NOWERE, so all I can get is Dial-Up.

IT SUCKS~
“You can’t outrun Death forever.
But you can make the Bastard work for it.”

Major Korgo Korgar
“Last of The Lancers” - AFC 32
(Andromeda Ascendant Record Database)
Offline Profile Quote Post Goto Top
 
Deleted User
Deleted User

Thanks Sothh

Just what I was looking for and am editing now! :yahoo:

I feel your pain about dial-up I used it for a number of years when everyone else had broadband :( (Apart from your good self I would presume)

Only one little question about the example I your most excellence wouldn't mind my querying, U..m the Tex Res is a bit low how would I boost it so it looks nicer without my character falling through the floor.

Apart from that little prob a very nice example may you make many bestsellers for years to come!

Cheers, Bez
Quote Post Goto Top
 
Deleted User
Deleted User

Don't worry I seem to have fixed it :music:


Just tweaked the wrap count :mad:


Thanks for example it owwnnsss :medieval:


Cheers, Bez
Quote Post Goto Top
 
jfarras
Advanced Member
[ *  *  * ]
I have ultimate 2.1 and when I opened the example game maker says that i don't have the 2.1 package...

What I need?
Offline Profile Quote Post Goto Top
 
skarik
Member Avatar
kitten eating scum
[ *  *  *  *  *  * ]
jfarras
Apr 30 2009, 01:28 AM
I have ultimate 2.1 and when I opened the example game maker says that i don't have the 2.1 package...

What I need?
1. You're probably trying to open the one with the GEX needed. Do you have the GEX installed? I know I don't, so I get the same problem.
Blog|EHS
Offline Profile Quote Post Goto Top
 
jfarras
Advanced Member
[ *  *  * ]
what is gex?
Offline Profile Quote Post Goto Top
 
Despellanion
Member Avatar
Forum God
[ *  *  *  *  *  * ]
jfarras
May 1 2009, 05:11 PM
what is gex?
Gamemaker Extension.
Edited by Despellanion, May 1 2009, 05:32 PM.
Offline Profile Quote Post Goto Top
 
« Previous Topic · Questions about Ultimate 3D · Next Topic »
Add Reply