x


How to avoid character with kinematic rigidbody go into obstacles and not simulation physic?

I have an arcade car that moves around. it's rotation is not realistic and can rotate any direction very fast. all gravity and rotation is under my control but since there is no rigidbody i can't avoid going throw other static objects. i need a way to bring it out when it goes into other objects.

if i add a rigidbody and set 'Use Gravity' true then my car control system and physic simulation will mixed up and cause bad result.

how can i do this?

more ▼

asked Jul 24 '12 at 06:53 PM

SkillDev gravatar image

SkillDev
25 1 5

Jul 25 '12 at 05:27 AM alucardj

My character is a car with box collider and i want to rotate it. so i cant set 'rigidbody.freezeRotation = true;'

Jul 25 '12 at 09:55 AM SkillDev

That is not the exact solution for my problem but gave me an idea to solve it. (I set my car to child of another GameObject with Rigidbody). Thanks.

Jul 25 '12 at 04:57 PM SkillDev
(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

Have you tried going through the Unity car tutorial? It will teach you how to create a basic car game and probably get you started.

more ▼

answered Jul 24 '12 at 08:33 PM

Muuskii gravatar image

Muuskii
1.1k 4 10

That is for realistic car. if CharacterController could be a Box my problem would be solved.

Jul 25 '12 at 04:30 AM SkillDev
(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:

x1784
x94

asked: Jul 24 '12 at 06:53 PM

Seen: 434 times

Last Updated: Jul 25 '12 at 04:57 PM