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
Collisions issues; 2.
Topic Started: Sep 21 2008, 06:11 PM (620 Views)
SonicMX
Member Avatar
Advanced Member
[ *  *  * ]
Hi, I've been trying some things with U3D lately and I got some questions, what's more some things I wouldn't like.

The first: When I have a terrain which has walls with holes, and even the wall holes are decreasing their height more and more, if I go towards one, and I keep going inside, the character ends inside of the terrain with more than the half of the body acrossing the terrain.
it might be because of the AttemptMoveToPosition, but if so, I don't really know if that can be fixed.

And the last one, if I wanted my character to catch some items, let's say coins, how can I really check that I'm making a collision with one of them?
I've tried using CheckSweptEllipsoidIntersection with just the name of the object, but that makes only one object (ID) to be caught.
If I use "all" I can't know which object I made a collision with, since U3D doesn't return it, does it?
At last tried it by writing that code on the coin object, but that, it sure is laggy, although I can set the code to only be executed when the distance to the character is closer, I wanted to know if it is possible by only using one code on the character object.

Thanks.
Soy español de España, y malo en mates, y.. ¿intento hacer un juego? estoy loco xD
Offline Profile Quote Post Goto Top
 
Gandalf20000
Member Avatar
Geek
[ *  *  *  *  *  * ]
You could use this script I wrote a little while ago...

Code:
 

//This is a script that is a 3d version of point_distance(x,y,x2,y2).
//The script should look like this when coded: PointDistance3d(x1,y1,z1,x2,y2,z2);
//Declare the variables of the first point.
x1=argument0;
y1=argument1;
z1=argument2;

//Declare the variables of the second point.
x2=argument3;
y2=argument4;
z2=argument5;


//Find the distance between the 2D points.
xy_distance=point_distance(x1,y1,x2,y2);


//Find the difference of the z variables. Use abs() to make sure the code never returns a negative number.
z_difference=abs(z2-z);


//Use the Pythagorean theorem to find the 3D distance.
//If you don't know, the Pythagorean theorem is "a squared + b squared = c squared"
//First, square the 2D distance.
xy_squared=sqr(xy_distance);
//Second, square the z difference.
z_squared=sqr(z_difference);
//Next, add them together.
added=xy_squared+z_squared;
//Find the distance by finding the square root.
true_distance=sqrt(added);

//Return the value
return (true_distance);


You can set the first 3 points at the relative position of where the object should be caught. Then the last 3 points should be where the object is. You can check with all the objects, as it shouldn't be too deadly to the FPS. You can also use a variable to detect if the object is being thrown.
Offline Profile Quote Post Goto Top
 
SonicMX
Member Avatar
Advanced Member
[ *  *  * ]
Gandalf20000
Sep 22 2008, 01:20 AM
You can set the first 3 points at the relative position of where the object should be caught. Then the last 3 points should be where the object is. You can check with all the objects, as it shouldn't be too deadly to the FPS. You can also use a variable to detect if the object is being thrown.
The script is great, but the way you told me to use it, is for an especific object (I mean, only 1), isn't it? Although, I could use it for the items ("coins" let's say), so that every of them would calculate the distance to the character, it must take lesser computing time than the SweptCollision script (I think).

I don't know if you understood me really well, I meant, I have a Game Maker object, which is an item, the object is repeated tons of times around the room. So that's why the trouble with the ID's.

Thanks a lot!
Soy español de España, y malo en mates, y.. ¿intento hacer un juego? estoy loco xD
Offline Profile Quote Post Goto Top
 
Andrew75
Member Avatar
Andrew75
[ *  *  *  *  *  * ]
Coins you say ?? you must me working on a sonic game huh??lol
if so,,,,what kind of sonig game u doing? also u have any screans?
Posted Image
(SONIC CD REMIX)
check out my vids
http://www.youtube.com/profile?user=tuxmask75
Check out our projects vids
http://www.youtube.com/profile?user=AXSXProject
Offline Profile Quote Post Goto Top
 
Eansis
Member Avatar
ghost
[ *  *  *  *  *  * ]
store them in an array u only need to check in one dimension the distance
Edited by Eansis, Sep 22 2008, 11:39 PM.
VOTE FOR BUDDY ROEMER HE'S A STRAIGHTFORWARD, DOWN TO EARTH AMERICAN GUY WHO ISN'T PART OF THE BIGBROTHER CONSPIRACY

Til'c
 
Things will not calm down Daniel Jackson. They will infact calm up.
Offline Profile Quote Post Goto Top
 
SonicMX
Member Avatar
Advanced Member
[ *  *  * ]
Quote:
 

Coins you say ?? you must me working on a sonic game huh??lol
if so,,,,what kind of sonig game u doing? also u have any screans?


Well, if I said "rings" It would probably sound strange for some people, since coins are more general and I wanted the same thing anyway xD.

Posted Image

At least my second issue was answered, but I think the first won't, so I better use famous invisible walls.

Soy español de España, y malo en mates, y.. ¿intento hacer un juego? estoy loco xD
Offline Profile Quote Post Goto Top
 
Gandalf20000
Member Avatar
Geek
[ *  *  *  *  *  * ]
It is just me, or does that screenshot look strikingly similar to Outset Island from Wind Waker? If so, why did you decide to use it with Sonic?
Offline Profile Quote Post Goto Top
 
Andrew75
Member Avatar
Andrew75
[ *  *  *  *  *  * ]
yeah its a bit familiar.
Anyways what kind of stuff you have done for your sonic game so far?
loops, sonic physics?, ect ??
looks nice so far ^ ^
Posted Image
(SONIC CD REMIX)
check out my vids
http://www.youtube.com/profile?user=tuxmask75
Check out our projects vids
http://www.youtube.com/profile?user=AXSXProject
Offline Profile Quote Post Goto Top
 
SonicMX
Member Avatar
Advanced Member
[ *  *  * ]
Quote:
 

It is just me, or does that screenshot look strikingly similar to Outset Island from Wind Waker? If so, why did you decide to use it with Sonic?


I don't know, just for fun, despite it isn't the best place for Sonic (xD) I just wanted to see it, I've already done it sometimes with some others stages.

Quote:
 

yeah its a bit familiar.
Anyways what kind of stuff you have done for your sonic game so far?
loops, sonic physics?, ect ??
looks nice so far ^ ^


Unfortunately I'm starting, I don't even have time for breathing with the school and the English studies (I'm Spanish), so, I'm going really slooooow, but doesn't matter x3. (I wonder how you guys do XD)

Soy español de España, y malo en mates, y.. ¿intento hacer un juego? estoy loco xD
Offline Profile Quote Post Goto Top
 
Eansis
Member Avatar
ghost
[ *  *  *  *  *  * ]
SonicMX
Sep 23 2008, 12:35 AM
Quote:
 

Coins you say ?? you must me working on a sonic game huh??lol
if so,,,,what kind of sonig game u doing? also u have any screans?


Well, if I said "rings" It would probably sound strange for some people, since coins are more general and I wanted the same thing anyway xD.

Posted Image

At least my second issue was answered, but I think the first won't, so I better use famous invisible walls.

wow that screenshot is awesome. Did you make the level yourself or get it from the internets (i'm hoping you did because I would like to know the site lol)
VOTE FOR BUDDY ROEMER HE'S A STRAIGHTFORWARD, DOWN TO EARTH AMERICAN GUY WHO ISN'T PART OF THE BIGBROTHER CONSPIRACY

Til'c
 
Things will not calm down Daniel Jackson. They will infact calm up.
Offline Profile Quote Post Goto Top
 
SonicMX
Member Avatar
Advanced Member
[ *  *  * ]
Quote:
 

Did you make the level yourself or get it from the internets


Nothing of that, I took it from the Wind Waker game, (since I've the original disc, I think I'm not making any illegal trouble).
(The water is obviously mine because some flat objects can't be ripped that well, so I had to edit it)
Soy español de España, y malo en mates, y.. ¿intento hacer un juego? estoy loco xD
Offline Profile Quote Post Goto Top
 
Eansis
Member Avatar
ghost
[ *  *  *  *  *  * ]
SonicMX
Sep 24 2008, 08:07 AM
Quote:
 

Did you make the level yourself or get it from the internets


Nothing of that, I took it from the Wind Waker game, (since I've the original disc, I think I'm not making any illegal trouble).
(The water is obviously mine because some flat objects can't be ripped that well, so I had to edit it)
How the heck did you rip a gamecube CD onto your computer????
VOTE FOR BUDDY ROEMER HE'S A STRAIGHTFORWARD, DOWN TO EARTH AMERICAN GUY WHO ISN'T PART OF THE BIGBROTHER CONSPIRACY

Til'c
 
Things will not calm down Daniel Jackson. They will infact calm up.
Offline Profile Quote Post Goto Top
 
SonicMX
Member Avatar
Advanced Member
[ *  *  * ]
Quote:
 

How the heck did you rip a gamecube CD onto your computer????


I never said I ripped my gamecube CD, this is like roms and emulators, you are legally free to use them only if you have the original game. So, I downloaded it ^_^
And for sure, sending content of the game disc is also illegal, so that's why you will hardly ever see anyone sharing models and that kind of stuff. This happens for example with Kingdom hearts models, Try searching on google, you won't receive anything from anyone (wisely).
Soy español de España, y malo en mates, y.. ¿intento hacer un juego? estoy loco xD
Offline Profile Quote Post Goto Top
 
Eansis
Member Avatar
ghost
[ *  *  *  *  *  * ]
SonicMX
Sep 24 2008, 10:14 PM
Quote:
 

How the heck did you rip a gamecube CD onto your computer????


I never said I ripped my gamecube CD, this is like roms and emulators, you are legally free to use them only if you have the original game. So, I downloaded it ^_^
And for sure, sending content of the game disc is also illegal, so that's why you will hardly ever see anyone sharing models and that kind of stuff. This happens for example with Kingdom hearts models, Try searching on google, you won't receive anything from anyone (wisely).
How did you rip the rom???? I would LOVE to rip the meshes from Goldeneye! :yahoo:
VOTE FOR BUDDY ROEMER HE'S A STRAIGHTFORWARD, DOWN TO EARTH AMERICAN GUY WHO ISN'T PART OF THE BIGBROTHER CONSPIRACY

Til'c
 
Things will not calm down Daniel Jackson. They will infact calm up.
Offline Profile Quote Post Goto Top
 
SonicMX
Member Avatar
Advanced Member
[ *  *  * ]
Eanbro
Sep 24 2008, 10:17 PM
SonicMX
Sep 24 2008, 10:14 PM
Quote:
 

How the heck did you rip a gamecube CD onto your computer????


I never said I ripped my gamecube CD, this is like roms and emulators, you are legally free to use them only if you have the original game. So, I downloaded it ^_^
And for sure, sending content of the game disc is also illegal, so that's why you will hardly ever see anyone sharing models and that kind of stuff. This happens for example with Kingdom hearts models, Try searching on google, you won't receive anything from anyone (wisely).
How did you rip the rom???? I would LOVE to rip the meshes from Goldeneye! :yahoo:
Quote:
 

How did you rip the rom???


Didn't I tell you I downloaded them? (You only need the original game for legal issues)
just get to a webpage which offers Games Isos and download them, then use them on your computer, and from there rip whatever you want. (you might get some texture problems with Nintendo meshes).
Soy español de España, y malo en mates, y.. ¿intento hacer un juego? estoy loco xD
Offline Profile Quote Post Goto Top
 
Go to Next Page
« Previous Topic · Questions about Ultimate 3D · Next Topic »
Add Reply