x


Increasing force script, physics and a special 2 wheel Bike setting

I have a special issue ... please help me on this! hm

i have a future bike.

  • It starts with a empty, which has a simple custom mesh collider on it.
  • This empty/mesh collider has a rigid body on it.
  • The empty holds the whole bike!
  • Under this empty are two meshes (the front & the back tail)
  • There are 2 wheels as another subobjects under the front & back tail meshes attached
  • Those wheels have no rigidbody. ... hm
  • The wheels have a mesh collider, cause i want excact collision behavior.

now what i need is a script, which i dont have (cause i am a pure grafic artist xD), that gives the empty (not the wheels) exponentially a increasing force/actuator/gear forwardly, by holding a mouse button, so that the bike moves forward and that the wheels are rotating by the friction of the ground and not by the force itself. imagine a jet engine that boosts the bike forward and the wheels are freewheeling rotating by the friction of the ground. The ground physic material is set to rubber too.

could & would someone please help me on this?

  • what script do i need?
  • what did i maybe wrong in my settings, by my special requirement?
  • i know that my requirement takes a lot of performance. but it should be more a simulation, than a faked bike physic game.

Please help me on this! :(

btw.. the steerment could be managed by another point at the back tail of the bike. which can be animated and simply assigned to a keyboard controller. so that's not the problem ... atm -.-

more ▼

asked Jul 28 '10 at 11:41 AM

SOIL gravatar image

SOIL
89 24 25 33

(comments are locked)
10|3000 characters needed characters left

0 answers: sort voted first

well i would try using a wheelCollider.

but if you set on the physics engine then you could try using a hingeJoint for the wheels.

more ▼

answered Jul 28 '10 at 02:54 PM

3dDude gravatar image

3dDude
2.6k 66 76 103

thnx man! after setting the wheels by using hingejoint the 1st time after my setting the wheels acted almost like i wish they should! interesting is that the spring parameters where set off, but still there is a spring to see. also the wheels are a bit unstable. the ridig body is the empty. are u strongly busy or is there a way to work with you in collaboration to finish this game? cause i am working with a scripter, who would do the gui, score and multiplayer part. but he is not so familiar with all the physics stuff and so. i do my part as a grafic artist and musician.

Jul 28 '10 at 03:53 PM SOIL

well i played another day around with hinge joint and it turned out that this was the solution of all :D i actually rigged the bike to almost 99% perfectly. it is stable and nothing on the bike jiggles anymore. some mass tweaking still needs to be done, cause the mass values of all parts of the futurebike affects almost everything. thnx again 3dDude!

Jul 29 '10 at 10:33 AM SOIL

sorry i have not written back... i have only been using unity for about 1/2 year.. so i'm not sure if i could help you or not. i also dont have Unity pro so i could not help with stuff like that... but i be happy to help with anything that i know. just PM me on unity forum.

BTW i am 3dDude on the forum to.

Aug 16 '10 at 09:08 PM 3dDude

can you explain how you got it working SOIL?

Apr 01 '11 at 12:54 AM japanitrat
(comments are locked)
10|3000 characters needed characters left
Be the first one to answer this question
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x3419
x1948
x63
x28

asked: Jul 28 '10 at 11:41 AM

Seen: 2156 times

Last Updated: Nov 25 '11 at 01:17 AM