x


Zero gravity race game issue

Im making a zero gravity racing game, Im having trouble implementing a good system that keeps my car on the track without using gravity, the main issue is with things like loopings and twisters. I have tried using mutliple raycast to set my rotation with Quaternion.LookRotation but that didnt work out too well, in a looping my car doesnt go past the vertical rotation point. I ended up having like 5 raycast to check everything around him.

Is there a better way to keep my car "connected" to the track, even if youre in the highest point of a looping?

thx.

more ▼

asked Sep 08 '12 at 02:25 PM

Robert955 gravatar image

Robert955
1 1 2

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

1 answer: sort voted first

Hmmm, couldn't you fire a raycast downward and see how far it is to the track, then move the car to the right distance off the track? How are you propelling the car and how are you keeping it on the track? Does it have wheels?

more ▼

answered Sep 08 '12 at 04:03 PM

Cool Dave gravatar image

Cool Dave
181 1 5 13

sorry I wanst very clear, the problem is that for example in a looping it should rotatie with the looping but it wont rotatie further when its in the middle of the looping. I am casting a ray downwards to check if the ground has changed angle and adjust the cars angle accordingly, but it wont work past 180 degrees.

Sep 08 '12 at 08:20 PM Robert955
(comments are locked)
10|3000 characters needed characters left
Your answer
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:

x798
x461
x83
x12

asked: Sep 08 '12 at 02:25 PM

Seen: 312 times

Last Updated: Sep 08 '12 at 08:21 PM