• 11
• 9
• 10
• 9
• 10
• ### Similar Content

• Hi, I've been working on this issue for a while and haven't yet found an answer.
Does anyone know the best way to convert unity's LAT & LONG into a vector 3 position that I could use in a virtual world (if it's even possible).

• I am taking an absolute beginner's game development course and we have just finished game jams in small groups. Our current assignment is to get feedback from people working in any aspect of game development. I would very much appreciate any feedback! The game is up on itchi.io (sound warning) https://wobbegong.itch.io/zombie-shooter It's essentially a very basic PvE.
I also have some things I'm wondering about, but you don't necessarily have to answer these.
1. Do you have any tips on working with physics? My group wrestled a bit with Rigidbody physics not totally working the way we wanted to -- jumping ended up kind of floaty and inclines seem to mess up movement. Alternatively... how can I build terrains with depth that won't result in wonky physics?
2. How can I keep up the level of challenge in an interesting way as the player progresses through the waves?
3. What are some of your personal guidelines for creating title screens?
Thank you very much in advance!

• I'm having a weird issue with detecting a collision. I've tried everything I could find online but nothing seems to work. I have a brick object. It has a 2D Collider attached and I have also attached a 2D Rigidbody on it. I also have an EndScreen 2D Collider. The EndScreen 2D collider is tagged with "EndScreen". I am trying to detect when a brick collides with the end screen collider and simply print "game over" in the console.
This is my current code for this part of the program, it is attached to the bricks:
void OnCollisionEnter (Collision2D collision) { if (collision.gameObject.tag == "EndScreen") { Debug.Log("Game over"); } } Several things have happened depending on the set up. If I have the rigidbody 2D set as static, my ball object can still collide with the bricks, but I get no Log message. If I set it to Kinematic or Dynamic, I get absolutely no interaction between the ball and the bricks, and nothing when the bricks pass through the collider. I have tried to set the collider to a trigger and use OnTriggerEnter2D, no change. I have tried to put the rigidbody on the EndScreen object and tried to set it's body type to all 3 settings, no change. The only thing I can think of that I have not done is put the script on the EndScreen object and switch the tag to the bricks. The reason I have not done this is because I will have several types of bricks, some of which will have different tags.

Please tell me somebody can see what I'm doing wrong here, because I'm losing my mind over something I feel should be ridiculously simple. Thanks.

# Unity Need help with physics

This topic is 1003 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I'm using Unity to develop a game. Basically i want the player/rocket to follow a point on the screen where user touches. But It's based on physics. Force must be added when user touches somewhere and the rocket has to reach that point. Gravity is there too. If the rocket passes the point then it has to come by using forces. This is the game
http://www.flashyland.com/219-jeux-flash-vol-Space-Oil.html

The rocket rotates too. I'm not good in physics at all.

Edited by AntiSaby

##### Share on other sites

So what kind of calculation are you using for the rocket force currently? Is it something like this?

rocket.applyForce(worldSpaceTouchPosition - rocket.position)


##### Share on other sites

i'm not real friendly with pointing my browser into the world so i can't tell what type of game you have, 2d 3d whatever.

so here's a copy/paste dump that may be helpful?

i imagine that eg. gravity is a cumulative effect... if your target is 15 "steps" away, then the gravity will be incurred 15 times.

The gain of a recursive system at recursion n is derivable using the pow function:

gain_at_n_recursions = pow(gain, n);

Eg. a variable multiplied by 0.5 on every sample is obviously 0.0625 of its original value on the 4th iteration:
0.0625 = pow(0.5, 4);

If we intend to have a specific gain at a specific number of recursions, we can calculate a gain coefficient:

sought coefficient = pow(intended_gain_at_n_recursions, inverse_of_n);

eg: 0.5 = pow(0.0625, 1/4);

Given any two of these variables we can derive the third using the identities:
x = pow(b, y);
b = pow(x, 1 / y);
y = log(x) / log(b);

eg. 4 = log(0.0625) / log(0.5);

if you have a 3d system then the camera-through-mouse line can be calculated, the nearest target to that line selected (what the player is aiming at) and the distance to that object is used as the range to calculate ballistics.

(from my audio dsp notes, http://www.xoxos.net/sem/dsp2public.pdf )

Edited by xoxos