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

Child Gameobjects are not fixed to the parent when using physics

I am trying to make a flight simulator-type game, but I am having problems with the child gameobjects of the rigidbody. At the top level I have the root gameobject which contains the model, the...

View Article


Rigidbody add force relative to any rotation

Hi, currently my main camera holds the cube in front of it, and as I look around the cube rotates as i am turning. My script now only will shoot the rigidbody straight on the right mouse click if the...

View Article


How can I improve my Push/Pull object script?

Hello everyone, I have been trying to get a push/pull script to work and finally I got something to at least work. I am work on a 2D game, and I am trying to push/pull a cube on a ground. The following...

View Article

help with firing projectile, character controller + child object

I have a character controller (with a plane childed for sprite texture), (This is a 2D platform game). I also added an empty gameobject called "shuriken_launcher" which I am using as a launch point for...

View Article

Rotate a catapult according to mouse

Hi ![alt text][1] [1]: /storage/temp/11450-dsdf.png I want to rotate my catapult paddle according to mouse touch(swipe),and throw red color ball when input.GetMouseButtonUp,when user touch the ball and...

View Article


Constant force motion: s = s0 + v0 * t + a0 * t * t. Why?

I have a **rigid body** with with an absolute **constant force** (100, 0, 0). I am trying to predict the next position of the rigid body. The mass is equal to 1 so the constant force and the...

View Article

Problem with rigidbody jumping off of platform.

I have a rather simple issue that I just can't figure out. I'm making a game where characters (rigidbody prefabs) walk by themselves and jump when they reach the edge of a platform. I have this working...

View Article

Jump heights are different on different devices

I'm creating a simple 3D game where the user touches the screen and it causes the character to jump. I've been testing on an android HTC One with a res of 1920 x 1080. Everything works fine. I've made...

View Article


Applying force to my object has no effect.

I have an object as my player, in my control class, I used to use the Transform.Translate, which worked but it was messing with my collider, after switching it to RigidBody.AddForce, my object does not...

View Article


Rigidbody only moving in one direction

So I'm not a coder so this is hell for me, but I am trying to get my head around this so bear with me please. I got this code using UnityEngine; using System.Collections; public class PlayerScript :...

View Article

addforce and onmousedrag ?

Hello.. i have a drag and drop code which works but now i discovered that this code updating the transform.position from a raycast doesnt work with collisions and i need that my dragged gameobject...

View Article

Fire Object forward from current rotation

My question is how do I use addForce to fire an object straight forward at its rotation? I currently have 3 variable to calculate the addForce with. They are the vertical angle of projection, the...

View Article

Is there any way to get a hinge joint to NOT let an object spring back to its...

Oh, and while I'm at it, how do you add force to an object in the direction you are facing? Thanks :D

View Article


AddForce Jump/Movement speeds multiplying together problem

Hey, When getting touch input from iOS screen, it seems that if I press a movement Rect, along with jump at the very same time. The MovementSpeed, and JumpSpeed seem to add together (As in the...

View Article

UCE0001 Problem

Hello, I am going through a tutorial on the player control and I am lost on what I have done wrong. Tutorial http://cgcookie.com/unity/lessons/3-scripting-the-player-controller/ Thanks in Advance!...

View Article


tilting/rotating an aircraft/space ship

hi. I am making a game where i would like my space ship to rotate or tilt to the side where it is flying. i would like to use physics rigidbody.AddForce for movement (set the higher drag to stop it...

View Article

AddForce isn't working properly

I want to apply a force to a character when the player applies a switch. gameObject.rigidbody.AddForce((3,1,0)*10)); when applying force with the above statement, my character is moving 3 units in x...

View Article


AddForce at mouse position only on table area

![alt text][1] [1]: /storage/temp/12877-mysituation.png I have a very specific question - First of all I am able to rotate stick around the ball according to the mouse position so this is working...

View Article

[C#] Recreating object A's velocity relative to object B

Hi, My code is currently duplicating an object on collision, creating the duplicate at the same relative coordinates on a duplicate of the original object and then attempting to recreate the impactor's...

View Article

AddForce on Prefab has inconsistent behaviour.

I am instantiating a prefab and using AddForce via ForceMode.Impulse to make it move. Unfortunately, every once in a while (approximately 1 in 20), AddForce does not work. Here is the relavent code:...

View Article
Browsing all 1264 articles
Browse latest View live


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