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

How prevent addforce when clicking resume button?

I am making a game and the player can pick up and throw a ball by clicking the left mouse button. The problem is that when you click resume game the ball is also thrown. Here is my script using...

View Article


How to make a ball stay in the air longer when force is added?

I am making a game and the player is allowed to pick up and throw a ball in the direction of where the camera is facing. I have 2 scripts for this that are exactly the same except one is for the x and...

View Article


How to aim a ball with cross hair?

I am making a game and the player can pick up and throw a ball. The problem is that the script that I use adds force to where the camera is looking and the aiming is inaccurate. I'm trying the make it...

View Article

How to make the player rotate to where an object is being thrown?

I am making a third person game and the player is allowed to pick up and throw a ball. the problem is that when you rotate the camera and cross hair in front or beside the player, the ball goes in the...

View Article

AddForce on Object at Direction of Click

Hi there all, I'm currently struggling to AddForce to an object, the object is a Domino and what i am attempting to achieve, that when i click on either 2 of the main faces (back and front) the domino...

View Article


Make object tip over

Hi all, wondering how i can make an object standing on its end IE. A Domino fall 'FORWARD' to the objects space and rotation NOT world space.. AddForce does not work as expected and only tips the...

View Article

Rigidbody.AddForce seems not to do anything

Hello everyone! I am trying to write a script for exerting gravity on all objects on a certain layer in every FixedUpdate. The code I have written can be seen below. In the testing scene I am working...

View Article

Character Controller to create a lateral dash (1st person) - Keep Momentum by...

Hi, hopefully somebody can help me with my problem. My main goal is to make my 1st Person Character Controller to dash sideway (quick lateral movement) when double taping A or D (within a timeframe)....

View Article


How can I calibrate phone accelerometer?

I tried all code snippets and watched every video I could find to solve this problem in the past three days...But nothing seems to work. I want to calibrate a mobile device accelerometer at the...

View Article


Rolling a ball forward with AddForce depending on the track direction

I have a ball that moves forward alone, the player only has to turn left or right to get the gems and not falling of the road. The problem is that I use a function called AddForce to push the ball...

View Article

i want my sphere character launched to the air when he hits collider. how to...

im new to unity and coding. so l have made a game where you use addforce to a sphere and it starts moving and the goal is to hit cubes. i want to launch the character to the air when the player hits a...

View Article

How to use addforce after animation?

I'm making a third person game and the player is allowed to pick up and throw a ball. The throwing animation is a trigger. The problem is that the force is added to the ball before the throwing...

View Article

Rigidbody2D.velocity.x not working but Y does

This code is suposed to add a force on the X axis every time I press SHIFT, but it just doesn't work, and if I try Vector2.up instead of Vector2.right it works, I don't understand why this is...

View Article


Move a rigidbody smoothly by swipe

Hi to all, i'm very new on unity and i'm facing my first problem. On my 3d project i have a spheric rigidbody that will rolling constantly along z (on a big square rigidbody used as "floor"), and i...

View Article

script failing to move player character

I'm trying to create a character controller that allows me to move a character in first person, with the right/left keys rotating 90 degrees, the back key rotating 180, and the forward key moving the...

View Article


How Do I Make My Bullet Add Force To The Object It Hits?

I've been looking around for a few days now and I still haven't found an answer so I'll ask it myself, in unity 2d I have a bullet prefab that has a trigger collider on the front. what I want to do is...

View Article

Animation stops rotation

I'm making a game with a car that can move left, right, jump and rotate left and right while in the air. I also want the player to flip 360 degrees when a button combination is pressed. I made left and...

View Article


The character velocity changes while the rigidbody is kinematic

In the Walk function, the velocity changes although the rigidbody is kinematic. I am changing the rigidbody to non-kinematic after the setting the velocity. In the Jump function, the velocity changes...

View Article

My complete script dont work (if a collision appear, push)

So im learning c# by myself, and obviously i need help. I want an object "magnet" to push another one "capsule" when it collide with, like a magnet on push polarity. i set a wider colider box for the...

View Article

Rigidbody.addforce not working,i cannot get my AddForce function to work. it...

My player character has a rigidbody but the addforce function is not making the character move. ive tried putting it in the FixedUpdate and the normal Update. public class PlayerMovement :...

View Article
Browsing all 1264 articles
Browse latest View live


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