Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

3 Dimensional Chat / model to map

Author
Message
Deathstryke
16
Years of Service
User Offline
Joined: 26th Feb 2008
Location:
Posted: 10th Jun 2008 22:48
Can you make a 3D model into a map for a game. If so then how? I can put it into the game but my character just walks through hills and other landforms instead of walking up and down them.

There is no spoon.
programing maniac
16
Years of Service
User Offline
Joined: 19th Apr 2008
Location: Bawk, Bawkity
Posted: 10th Jun 2008 23:12
Do you mean like when you make terrain, you can do dbGetTerrainHeight? And you want to know how t do that for 3D models that are imported? I have no idea....

Global Warfare
dark donkey
18
Years of Service
User Offline
Joined: 4th May 2006
Location:
Posted: 10th Jun 2008 23:24
Sure all my terrains are 3d model(dont know what else they would be but hights map). The problem isnt with the 3d model its to do with coding you need a collision system. A very basic one would be to get if the player model and terrain model are colliding. If so increase the y position a bit if dont deivide it so if the model is coliding it moves up and if not it moves down. You may get the idea that your player model will keep on moving up but it wont it will stay level but with s bit of jerkeyness. And when aprochign terrain the player model will walk up it. This is not the best way to be collision but its the simplist i know of.
Deathstryke
16
Years of Service
User Offline
Joined: 26th Feb 2008
Location:
Posted: 12th Jun 2008 19:26
ok thanks

There is no spoon.
Phosphoer
16
Years of Service
User Offline
Joined: 8th Dec 2007
Location: Seattle
Posted: 13th Jun 2008 07:27
You can also use the Intersect Object command.

From the help menu:

"This command will return the distance to the point of intersection between two coordinates, in reference to the specified object. Use this command to project a line from your
current position to a destination to determine whether a collision will occur with an object. Ideal for bullet calculations and fast manual polygon collision."

Basically you'd cast this ray from your player's position to a distance underneath him, and if the returned collision distance is greater than a certain amount you'd decrease the player's Y position. The certain amount would vary depending on how tall your character is.

This is a random sentence about squirrels.
programing maniac
16
Years of Service
User Offline
Joined: 19th Apr 2008
Location: Bawk, Bawkity
Posted: 13th Jun 2008 14:21 Edited at: 13th Jun 2008 14:29
Phosphoer,

Is that a fast method??? IF it is..... Thanks YOU!!!!! I am working on a game and I am trying to get gravity and physics and I think you just solved my problem!!!

i looked at it in the information thing, and it was a bit confusing. How can I use it as a boolean thing so that I can test if something is true or not?

float dbIntersectObject ( int iObject, float fX, float fY, float fZ, float fToX, float fToY, float fToZ )

It is more of a float number, but what does it return as a value? Does it return the distance?

Thanks

Your signature has been erased by a mod - 120 high maximum please
DB PROgrammer
17
Years of Service
User Offline
Joined: 9th Feb 2007
Location: Nowhere But Everywhere
Posted: 13th Jun 2008 20:48
I can answer this Yes the command "dbIntersectObject" returns the distance. It returns a float but if you just check if the float>0 then you know if you need to apply gravity or not.


I'm Pro grammer.
programing maniac
16
Years of Service
User Offline
Joined: 19th Apr 2008
Location: Bawk, Bawkity
Posted: 13th Jun 2008 23:22
Quote: " float fToX, float fToY, float fToZ"


Is that part the direction in which the ray is going?

Your signature has been erased by a mod - 120 high maximum please
DB PROgrammer
17
Years of Service
User Offline
Joined: 9th Feb 2007
Location: Nowhere But Everywhere
Posted: 13th Jun 2008 23:41
Yes, it starts here

Quote: "float fX, float fY, float fZ,"


and ends here

Quote: "float fToX, float fToY, float fToZ"


Good luck!


I'm Pro grammer.
programing maniac
16
Years of Service
User Offline
Joined: 19th Apr 2008
Location: Bawk, Bawkity
Posted: 13th Jun 2008 23:43 Edited at: 14th Jun 2008 01:15
thanks.

Could you actually write a small code sample of using the dbIntesectingObject, I don't think I completely get it.....

Your signature has been erased by a mod - 120 high maximum please

Login to post a reply

Server time is: 2024-11-25 18:41:29
Your offset time is: 2024-11-25 18:41:29