• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Tragic · Sep 08, 2012 at 07:22 AM · physicsrtslimits

RTS Physics too much?

I was wondering whether or not an RTS with physics would be too much. The physics im planning on using is on the projectiles of units such as tanks.

I would like the game to calculate the angle at which the projectile should be fired at to reach the destination at the set velocity and mass.

I'm planning a unit cap of around 500.

I will be calculating the physics through a custom reusable math function.

I'm fairly new to game development and Unity so I don't know the limits of where I could push gaming to.

So do you think that projectile physics would be too much for a 500 unit RTS?

Comment
Add comment · Show 2
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image fafase · Sep 08, 2012 at 07:27 AM 0
Share

Just to get it right, you wonder about a math equation that returns the needed angle to shoot a rocket and land on target. I think this is there http://answers.unity3d.com/questions/49195/trajectory-of-a-projectile-formula-does-anyone-kno.html.

avatar image Tragic · Sep 08, 2012 at 06:58 PM 0
Share

Lol alright noted.

1 Reply

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by Fattie · Sep 08, 2012 at 10:22 AM

1) there is utterly no problem performance wise. what you describe is "nothing"

2) "I will be calculating the physics through a custom reusable math function...."

you realise that game engines DO ALL THE WORK FOR YOU. you never need "custom" or even "reusable" functions to throw projectiles around.

it sounds like at this moment, you know nothing about Unity so far. You will be amazed to hear that sending a cannonball is this easy.

 cannonball.rigidbody.velocity = launchAngle * 23.5;

(assuming you want to shoot it at 23.5 meters per second ... you could put any speed in there .. note, you MUST use meters and kilograms everywhere in Unity3D.)

Hope it helps!

Comment
Add comment · Show 4 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Tragic · Sep 08, 2012 at 07:00 PM 0
Share

Well this is very informative thank you.

avatar image Eric5h5 · Sep 08, 2012 at 07:42 PM 0
Share

You don't have to use meters. Units are just units, they aren't really meters. You can define them to be anything. Also kilograms are not used at all. $$anonymous$$ass is purely relative, and the docs advise keeping it to a fairly low value in order to avoid precision issues (I think they say 1.0 - 10.0, but in my experience, 1.0 - 1000.0 works fine).

avatar image Fattie · Sep 08, 2012 at 08:07 PM 0
Share

trag, you "must" use meters in the sense you must comment your code and you must not use globals everywhere :-)

if (for some reason) you use a non-real world scale, don't forget to change the gravity settings.

you make video games based on the real world, so your tank speedometer will say "55 mph", you know how fast a baseball pitcher pitches in the real world, you know how much a brick weighs, and so on.

As Eric notes, if you are I would say really arithmetically adept, you can certainly just use any abstract units - in that case when you build things you will "just know" the mass of all your suspension components in your own units, the torque to apply to things in your own units, how fast a zombie runs in your own units, and so on.

(of course if you're doing a more abstract game, it may be irrelevant - you just try wild values changing by a few orders of magnitude until something happens to look O$$anonymous$$)

avatar image Eric5h5 · Sep 08, 2012 at 08:18 PM 0
Share

It's not as simple as that. There's the issue of floating-point precision (or lack thereof), so sometimes you just can't use meters, depending on the scale of what you're doing. $$anonymous$$ass is really arbitrary; generally what I do is set the "main actor" (whatever that might be) to 1.0 and make everything else relative to that. Games are about making things "feel" good, not about trying to make everything physically accurate. In fact it's not uncommon for "physically correct" stuff to actually feel somewhat "wrong".

Your answer

Hint: You can notify a user about this post by typing @username

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

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

11 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

2D 360 degress platformer example needed 0 Answers

How to check if an object of objects is inside a spherecollider 1 Answer

hinge joint bounce min velocity - physical explanation please 0 Answers

Overlap Sphere not detecting prefabs of the same object 0 Answers

Can configurable joint with angular limits use slerp drive? 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges