Questions about Unity Scale and Transform.Translate "Speed"

I’m working on a “fan made” Star Wars flight simulator project for myself and I feel like some of the model assets that I’ve used are extremely large in scale which I am assuming results in pretty high “speed” of a transform.translate to actually be very slow. I’ve increased it to the 10,000s and it doesn’t seem to really change after a point. My guess is that the reason that objects seem to be moving slow is because they are actually very large in the game.

The ship model that I am using feels very large in scale. I can place a 450x450x450 cube inside of it, which leaves just a part of the ship extruding from its edges. The ship model itself is set for 0.5x0.5x0.5 scale.

Example: http://i.imgur.com/qLrNTzd.png

I have 3 cameras setup. The first two are chase cameras that follow the ship and are children of the ship. The third is not a child and is on its own, but follows the ship with LookAt. If I use the following code, the ship is still moving very slowly for the viewer using the camera that doesn’t follow it. The cam that isn’t a child has a far culling of 20,000 right now, just so I could see the object at a reasonable distance which seems obsessive.

transform.Translate(Vector3.forward * s_currentEnginePower * Time.deltaTime, Space.Self);

Currently in the script s_currentEnginePower is 10,500 when the engine is at 100% power. This is the “speed” you can see in the video below. Quite slow.

If I am correct and resolve this by lowering the scale even further than I would have to use long decimal scales for some objects like the ship. Probably resulting in the scale being lower than something like 0.1 or even 0.01.

Any input or ideas or information on the relation of scale and speed/velocity of objects? Right now I can’t get the ship to move fast enough.

This also makes me wonder how far Unity can actually even go in the x y and z and how it effects performance for objects to be larger.

Sounds like you need to adjust the import scale of the ship because judging from the first screenshot, your ship is more than 450m wide. Select the ship’s model in the project folder and reduce the ‘scale factor’ on the ‘model’ tab. That ship was probably modeled using different units of measurement like centimeters. Unity’s default units are in meters.

0.01 is a common setting when things get imported too large. Also you might want to set the ship’s scale in the inspector to (1,1,1).

Use a 1x1x1 cube as reference for the final ship size.

1 Like

Oh! Didn’t know you could do that. Thank you!

That definitely resolved all the problems with not being able to move fast enough. Now about 900 is more than adequate for the max. I wasn’t sure how to go about addressing that issue without using really small scales and that didn’t feel like the best way.

Thanks again.

Using small scales isn’t as big a problem as using large scales. Ultimately it just comes down to how things look and feel. With a space game, you have a lot of leeway as you aren’t dealing with real physics, small usually helps well with that.

1 Like

As a note your going to run into floating point error issues at 900m a second before too long and they are relative so scaling down wont help you. I’ve found that I start seeing jittering at above 9999 meters from origin in unity in VR, not sure what the number is for non VR projects. Also physics becomes less and less accurate as you move from origin.

There are lots of ways around this but take a look at this post for a better understanding of what to watch out for:

2 Likes

Thanks for the info.