# How to make a good car with wheels?

Member Posts: 646
edited December 2011
Hey there everybody

I would ask, how can I make a good car with spring-loaded wheels?

Thanks to everyone :-)
---
Benjamin

• Member Posts: 647
Hahaha
• Member Posts: 9,914
It's all in how you set the restitution and density that affects how it collides with the ground.
• Member Posts: 646
@FryingBaconStudios

Yes, but i already known that. But I mean how can i make my car spring loaded between my car-body and my wheels, not between my car and my ground.
---
Benjamin
• Member Posts: 646
Thanks much RKS

Here is a video from another problem. The red polygons are the wells from my car. But if i add an accelerate down behavior, the wheels are not working really good. They stop rotating after a lil second. Can anyone help with this problem?
Video:

---
Benjamin
• Member Posts: 9,914
You don't have enough forward velocity and reduce the drag.
• Member Posts: 4,630
Would you like me to make a tutorial for you?
---------------
Posted by LeonardDeveloper, contact me on thermoapps@thermo-apps.com
Be sure to visit my WEBSITE
Have a look at my GS Tutorials

----------------------------------------------------
Yours Sincerely,
Jack Leonard

• Houston, TexasMember, Sous Chef Posts: 2,870
edited December 2011
Until we get joints, this will be a difficult effect to achieve. The wheels are bunching on top of one another once you hit the ramp, and the rotation is slowing down because of the force being applied. To fix the distance between the wheels, you're going to have to set up more constraints that are constantly checking the distance between the wheels, and when they start bunching together, you're going to need a rule that forces them to constrain and remain the same distance apart from one another, which could bog down performance. You could do the same thing with the rotation as well. That will be hard since it accelerates, and having it timed right with the speed of the actor will be almost impossible. You would be better off with a still image for the entire car without tire rotation, and then when it's moving, change actor to an image, or animation that resembles it having tire rotation.

The spring action between the body of the car and the wheels is something i would't even know how to achieve without tons and tons of math and magnitudes. Unless you take advantage of a change attribute with a timer that constantly checks for vertical position, but with a slight delay, like a half second or something so that it will have that split second to move off position, and then be put back when the timer activates, telling it to constrain to a position. But then you would need to use a interpolate behavior so that it kind of slides, and doesn't "pop" back to its proper position. Lots of demands on the processor, and probably undesirable playback. But then again, you never know until you try it.
• Member Posts: 646
@FryingBaconStudios

Yeah, thanks..that helps much. I've forgotten velocity

@LeonardDeveloper

Yes that would be very kind of you
---
Benjamin
• Member Posts: 4,630
@benjamin_m5
It won't work very well..... because we don't have joints as @slickzero said but ill give it a shot anyway!
• Member Posts: 646
@SlickZero Thanks much for your words

Wow, that looks from tons of work. But is it really so hard to make spring loaded wheels, because lots of flash games have spring loaded wheels. Have they better programming software or tools?! I already thougt about that, that it is really difficult... Have nobody tried this yet? I think too, that the car with the spring-loaded wheels isn't possible until we have joints...this is a pity

So... i have to work with only one actor?! But i think that didn't work very well...
---
Benjamin
• Member, Sous Chef, PRO Posts: 2,861
Fire Maple Games' Elasticity Demo will show you how to do this. I just checked on the dashboard in GS creator and couldn't find it. (Many of the great demos seem to be missing.) Here is a copy of it. I hope FMG does not mind.
http://speedy.sh/FgVuc/Elasticity-DEMO.zip

RThurman
• Member Posts: 646
Thank you

And yes, yesterday i searched for a little demo. But i couldn't find this.
---
Benjamin