Rolling ball character

Hello everyone, I am a “Novice” in unity, I know almost all the basics, I did the car and lerpz tutorials, and I am more than a beginner in javascript.

But I am facing a problem with this “first” game I am trying to make as a first real project…

Scripting Language : JavaScript

Main Character : Rolling Ball

Controls trying to mimic : 欧美视频第一区二区三区_亚洲有码一区91_欧美一级婬片人妻欧美大_韩国一级无码免费大片

Problem:
I am trying to make the way you control the character act exactly as the game displayed in this link:
欧美视频第一区二区三区_亚洲有码一区91_欧美一级婬片人妻欧美大_韩国一级无码免费大片

I tried assigning a Character controller component to the ball, and got it moving with the camera working exactly as I wanted in Smooth follow, but i faced a problem with :

1- Ball physics : Not a rigid body…

2- Rotating the ball to give a sense of reality : If i give the ball a “transfrom.Rotate” , the rotating stops at 90 degrees because the axis is rotating with it.

Then I tried making the ball a rigid body and controlling it with “AddToruqe” or “AddForce”, and nested an empty GameObject inside the ball so that the camera can follow it, but faced a problem yet again…

Camera is not behind the ball at all times: meaning that when the player presses “Right” or “Left” arrows, he will see the ball going in the direction he wants but the angle of the camera is the same at all times, it does not come behind the ball like you saw in the link provided above.

What I need is a rolling ball playable character, with physics and camera movement as shown in the link above.

And as a bribe :twisted: when this game out sells World of Warcraft!! i send you all a copy MWAHAHAHAHA!!

seriously though :smile: thanks for the help in advance :slight_smile: [/list][/list]

What you need to do is set the ball up as a physics object that you apply forces to, to get it to move.

A lot of the information you want is here:
file:///D:/Program%20Files/Unity/Editor/Data/Documentation/Documentation/ScriptReference/index.html

You can also look around for tutorials.
I also have a ball moving script and camera script but not quite what you want… My ball doesn’t ‘turn’ it just rolls in 4 set directions. You can have this if you want?

Thanks a lot for the replay, I am sad to say that I already read through most of the scripting reference , but still as you said, not what I wanted,

did you take a look at the link? that’s pretty much what i need

is anyone able to help? its driving me nuts

Welcome to the forum, Eaves!

A typical solution to this problem is to make the ball’s movements camera-relative. You can do this by using the camera’s coordinate axes as the torque axes for the ball. For example:-

// Move camera forward/backward.
rigidbody.AddTorque(Camera.main.transform.right * amountOfTorque);

Thanks alot andeeee!! nice idea, will try it out