Quantcast
Channel: Questions in topic: "addforce"
Browsing all 1264 articles
Browse latest View live
↧

Add force random movement and random rotation [2D]

I have a box and inside three 2D sprites. The walls of the box have bounce surface material. What I would like is these three sprites to move with random speed at random direction and every time one of...

View Article


Rigidbody Addforce not working as expected ( video included)

When grounded my vehicle moves rather slow When slightly off of the ground I get the same results as if grounded Lifted off the ground slightly more the vehicle accelerates like 10 time more the normal...

View Article


Rigidbody2D won't apply force after collision

I'm trying to make an animal object jump after it touches a platform, similar to Sonic when you destroy an enemy and they jump around when they come out of the badnik. I got the initial force when the...

View Article

character jump is jerky

I have a 2D square sprite I'm using as the main character. Movement left and right work which I have in another script. the jump I'm putting in its own script. I'm using Addforce on the rigidbody2d...

View Article

Diagonal aiming

So im working on a bowling game, and the way the aiming in the game works is almost entirely based on space bar. When you hold down spacebar, the ball will move laterally across the lane back and...

View Article


How do I add forces for the specific sprites of a particle?

There is a particle consisting of 40 pictures my effect. how I may call it the addforce method they the particle onto pictures forming an effect what collide with a thrower weapon? I want a smoke into...

View Article

Help with 2D topdown knockback

Hello! i am having a problem with my 2D topdown game, i want to make a slime knockback the player, and i can´t do it work like i want to, i want it to knockfrom right to the left, up to down ETC. but...

View Article

AddForce in Character Controller problem

Hi! I've got a problem with function AddForce. When sth get into trigger of my character (eg. enemy) I want my character to Jump back (eg. with Vector2(5,5)) but when it happen my character jumps only...

View Article


AddRelativeTorque and gameobject's angularVelocity

I've been experimenting around with some of the physics in Unity and something seems weird to me with the AddRelativeTorque function. I have the following code in order to slow and eventually stop a...

View Article


addForce problem please help!

![alt text][1] [1]: /storage/temp/65988-pic.png hello , i making a tutorial for fps game , like movement and jumping . im useing addForce to make jump like the tutorial but instead of jumping ith...

View Article

Move Physics2D Object With Mouse Using AddForce?

Hi all, I'm having a little trouble finding a solution to this anywhere online. Basically I need to have a 2D platform that catches objects falling onto it, but I need those objects to follow the...

View Article

RigidBody only moves when I remove Collider

I'm trying to create Flappy Bird as a tool to learn Unity & essentially I've added this script to the "pipes". When I remove the Collider they work perfectly fine, but obviously I need the collider...

View Article

How to stop the character moving after the button is pressed, using...

Hi guys, I'm currently making a top-down game that has the player character using physics (Rigidbody2D().AddForce) You move the player using the WASD keys, however the character keeps moving forward. I...

View Article


2D Top-Down Character: How to make my character move using physics?

Hi guys, I've been trying to make my character move using add force and rigidbody, but I'm still quite new to Unity. It's a 2D top-down character. Thank you very much for the help. There's only one...

View Article

Input Touch Not Working Quite Right...

Ok, I'm trying to make it so that anytime the user has to hold the bottom of the screen to "float up" & then they would tap the top, while holding the bottom to get them to "float down". Ideally...

View Article


Enemy AI Script Error

Hey guys, Currently I'm trying to create a enemy AI that follows the player once it hits the raycast. However I'm getting 3 errors on my script. I don't know how to fix them, if anyone could help that...

View Article

Rigidbody.AddForce from raycast.hit

Hello, i've got an perfectly working raycast script. At the moment the raycast script spawns a particle system at the hit.point, and Quaternion.FromToRotation. But i really want it so if i shoot and i...

View Article


Error problem with addforce

Hello i have a problem with my script. Trying to add force to this gameobject when i shoot it with my raycast. And it will move AWAY from the player (where the raycast it casted from). But i get a...

View Article

Custom gravity pulling in weird directions.

I have a game I'm trying to make where the player jumps between planets in a 2D space. I have the "jump between planets" part down but my gravity is not working well. The way it currently works is that...

View Article

Player going through walls

Hello everyone. i searched the whole internet and found no answer. so i'm gonna ask here. i have my player which is moved by this part of the script:...

View Article
Browsing all 1264 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>