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

Best way to move a Rigidbody2D from point A to point B (Mouse Position)

We have the following scenario: ![alt text][1] [1]: /storage/temp/78327-move-a-to-b.png We would like to know what would be the best way to move a 'prefab(bullet)' with rigidbody from point A to point...

View Article


The new Unity Update Messed Up My Project a bit, Please help?

Okay, first off, and most annoying for me, Is Unity now wants to Open Virtual Studio to open up my scripts instead of MonoDevelop. How do I change this? Also, I used AddForce on a RigidBody (My game...

View Article


AddForce only working inside another object's collider

Hello everyone, this is my first post in this forum, so thank you for understanding, any comments are welcome, and I will be very thankful for help, because I'm stuck on a very strange problem at the...

View Article

Quirky animation related question

I'm sure it's not the right title/question, but I'm facing an interesting challenge. I've built and animated an actual bread factory for a client. Animation is composed of many loopable elements, based...

View Article

Burst Fire?

When he spawns he shoots 2 bullets at once and never again. using UnityEngine; using System.Collections; public class BossScript : MonoBehaviour { public float max_health = 20; public float health = 0;...

View Article


AddForce to cube barely moves the object

I'm working on a very basic dungeon crawler game, mostly to develop my skills more than to actually make a game. At the moment my enemies are just cubes. I've got add force working in that I can tell...

View Article

I am very new to c# and all this. I am an absolute beginner and i am stuck at...

public class PlayerController : MonoBehaviour { private Rigidbody rb; void Start () { rb = GetComponent(); } void FixedUpdate () { float movehorizontal = Input.GetAxis("Horizontal"); float movevertical...

View Article

Player Jumps twice with double jump deactivated

Hey guys! I've got a bit of a problem that I just can't figure out how to solve. I'm making a new character controller script and I'm planing an having a double jump in my game when it is unlocked. I'm...

View Article


Rigidbody2D AddForce only working with large numbers

I have a character that I am trying to make jump. I can make them move left and right with inputs and setting velocity and what not, but the jump isn't working. I'm using AddForce like so: ![alt...

View Article


Can someone give me simple script for melee attacks on mouse click C#.

I'm trying to create diablo inspired short game with C#, but now I'm stuck on something that might seem simple to you but not for me heh. I wrote script to move character around on my left mouse click...

View Article

AddForce mechanism ?

public GameObject target; GameObject Bullet = Instantiate(bullet, transform.position, Quaternion.identity) as GameObject; Bullet.transform.localRotation = Quaternion.Euler(90f, 0f, 0f);...

View Article

Rigidbody.Addforce not working in Unity 5.4.1

Hello! In my game, I’m trying to get my player to jump, and in past games it’s worked, but for some reason now it just won’t do anything. I don’t get any errors, but whenever I press space, nothing...

View Article

Jumping is slightly faster than running due to friction

I have a 2D character controller that uses addForce to run and sets a clamp to limit run speed. It all works great on the ground. But - due to friction, my character moves slightly faster on the x axis...

View Article


Instantiated rigidbody lags before applying .Addforce

Hello, everyone. So, i instantiate an object using a code below. Right after it spawns it just stay still for ~0.3 seconds and only after that it starts moving. If i change interpolate of that object...

View Article

Add force to my back ??,,

how can i add addforce to my Back??. i have a script, but addforce not go to my back, it always go to z axis, when i rotate my character, it always add force to z axis. I need to addforce to my back,...

View Article


How do I create Sling-Shot like propulsion?

This is my first post, so please excuse any errors in my level of detail or wording. But ultimately, I am trying to accomplish this: My character *(who is on a linear path with a constant velocity, not...

View Article

Make gradual acceleration with drag.

Im making a top-down game where you control a spaceship. Your spaceship has a rigidbody and with W/S you increase/decrease the thrust (from 0 to 1) and every fixedupdate i do this: rb.AddForce...

View Article


How to apply a knockback without it looking like teleportation?

So I have the following script which applies force when a player gets hit. I like the speed that the knockback is currently set to, but I would like for the player to move back more smoothly instead of...

View Article

Apply Force when a Rigidbody ExitCollider

Hi there ! It might sound extremely simple, but I searched for LOTS of forums and tutorials and can't get it right. I just want my little player there get a big gravity like force on its' Rigidbody...

View Article

What is wrong with this script?

This is my 5th augmentation of some code to make a cube move. That's it, just move in any direction at any speed and I have been ripping my hair out for 2 days trying to get it to work. I have copied...

View Article
Browsing all 1264 articles
Browse latest View live


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