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.

Dark GDK / Sparky's oval/eliptical collision slide. Sphere with a greater Y scale?

Author
Message
Neotron
14
Years of Service
User Offline
Joined: 21st Jul 2010
Location: I am in an underworld , making a E.Army
Posted: 17th Aug 2011 16:33
Hi guys.

So what i want to ask is how can i do a slide collision based on a sphere with different x,y,x sizes.

I have a space ship model whose size in x,z is 15 and y=4. I need to keep the y collision at 6 and still have collision with x and z 15.
So its like a nice snug fit collision.

Any ideas?

BTW my level is made out of blocks so the sides of the blocks stops the ship as the ship is on the block it self.

My function has some global values that are vx,vy,vz and a few more.
Heres the function:


Your signature has been erased by a mod
Neotron
14
Years of Service
User Offline
Joined: 21st Jul 2010
Location: I am in an underworld , making a E.Army
Posted: 19th Aug 2011 00:04
Hello?

Ok so i would like the same collision as the one in the Nuclear glory.
But i want it done in sparky , cause i love it.

So the question becomes.

How can i implement this collision?

Like a traditional old space ship saucer. Its round but its y scaled down. How can i use the collision slide with this kind of model?

Thanks in advance

Your signature has been erased by a mod
WLGfx
17
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 19th Aug 2011 01:19
I've been waiting for a reply to this as I've not found a way using Sparkys yet either. If elliptical isn't available then it may have to be a bunch of cubes or as a complex object, but then the downfall is that sliding collision wouldn't work...

Warning! May contain Nuts!
Mireben
16
Years of Service
User Offline
Joined: 5th Aug 2008
Location:
Posted: 19th Aug 2011 08:31 Edited at: 19th Aug 2011 08:33
Unfortunately Sparky's cannot do ellipsoidal collision. With a forum search, all advice I found was to approximate the shape with several spheres, or change the sphere size according to movement direction. This may not be a big problem with elongated shapes (such as a human body which, in addition, cannot fly, so it doesn't have so weird angles of movement) but your spaceship is more difficult.

I've been thinking about how to fill your shape with spheres, but the best fit I came up with consists of 9 spheres (see the attached, not very good drawing), so you'd need 9 casts instead of 1 which is a performance hit. Maybe not so much for only one object, but if there is a whole fleet of spaceships, it will be slow. In addition, I don't have really good solutions for what should happen when several spheres collide (maybe reduce movement distance until there is only one or no collision?), or what if sliding along one sphere brings the ship into collision with another one in the next loop. Still, you can try how this approach would work.

This is the first time I heard of the Nuclear Glory plugin. Have you tried it? Faced with a similar problem like yours, maybe I would start looking for another plugin or a physics engine.

Attachments

Login to view attachments
Mireben
16
Years of Service
User Offline
Joined: 5th Aug 2008
Location:
Posted: 19th Aug 2011 08:54
P.S. Dark GDK can return sliding coordinates for boxes, but then you'd have a problem with the corners of the box, which the shapeship does not fill. It depends on the game design if this is accurate enough or not.
Neotron
14
Years of Service
User Offline
Joined: 21st Jul 2010
Location: I am in an underworld , making a E.Army
Posted: 22nd Aug 2011 06:17
Sorry guys , i was away this weekend.

So Mireben, that was a really good idea. The thing is that (according to your theory) my ship must have 2 sphere slides , one in the front and one at the back.

This should solve the problem.

Thanks guys.

Your signature has been erased by a mod
Neotron
14
Years of Service
User Offline
Joined: 21st Jul 2010
Location: I am in an underworld , making a E.Army
Posted: 24th Aug 2011 22:52
I tried doing four sphereical casts. But it was way too slow.

So just got the problem solved.
I changed some values and got it as i desired. Using one cast only and positioning it a little higher.
[solved]

They asked me for a proof.
Now i am making one........
Hotline
16
Years of Service
User Offline
Joined: 22nd Aug 2008
Location:
Posted: 8th Dec 2011 10:50
Quote: "P.S. Dark GDK can return sliding coordinates for boxes, but then you'd have a problem with the corners of the box, which the shapeship does not fill. It depends on the game design if this is accurate enough or not. "


Are you sure about this ? I didn't tried it but i don't think boxes can return sliding data as you can't perform sweep tests on boxes . That would be possible only with a SC_BoxCast command.But if i'm wrong and it is possible , i will switch to GDK just because of THIS command !!!



Login to post a reply

Server time is: 2024-11-19 06:48:18
Your offset time is: 2024-11-19 06:48:18