Start Button
how can i make this script start after pressing button like tap to start if i put it on Update or Start when i press the button its so slow using UnityEngine; public class PlayerController :...
View ArticleNot able to add forces to a Rigid Body Game Object from a script attached to...
Hello, I am trying to simulate a bottling assembly line in unity, I got stuck with a problem. I have bottle model as a Prefab and will Instantiate it in conveyor continuously in an interval and there...
View ArticleAddForce problem 2d
So, i 3 hours trying to make a shooting weapon. Its spawn on weapon, but not moving. using System.Collections; using System.Collections.Generic; using UnityEngine; using System; public class...
View ArticleUsing AddForce for horizontal movement doesn't quite work the way I want it...
I'm working on a 2D-Platformer and my character has a punch attack that is supposed to propell him forward a little bit in whatever direction he's aiming at. This works fine when I punch vertically,...
View Articlepulling in objects one end, and releasing out the other
I was wondering how to make a collider that will suck rigidbodies in one end, and release them out the other? @ThePixelatedSword @Kilsnus @meat5000 @Captain_Pineapple @oroora6_unity @Eno-Khano @davidcox70
View ArticleMoving a camera with AddFoce, or setting velocity, need help
This seems like the kind of thing I should be able to quickly find a reference or tutorial for, but the keywords just don't seem to lead me to anything. So, here is my workflow: Character Control...
View ArticleCorrecting Directional velocity for a plane
Hi, I am trying to simulate flying, but not with 100% real physics. Now the problem I've been banging my head against the wall with is the applying velocity based on the planes direction. //Apply...
View Articlepulling objects across a collider
this script i attach to a collider and it pulls objects accross the colliders axis i chose. so if i set it to x axis any object that enters world travel along the colliders x axis at a speed i chose....
View Articlerotate object with transform.lookat + mouseposition
i want my object to rotate facing my current mouse position in a top down moba like view. however i dont know how to bring the mouse position in i only found this script to look at a target public...
View ArticleUnity AddForce Problem (not a bug problem, but a math problem)
Sorry for the lack of details in the title, the reason for that is that I don't know a short way of how to explain the problem I want to solve. Here's some context: I'm making a 3D platformer game...
View ArticleHow to make a ball capable of rolling around a loop the loop?
Hello to all. In my game, I want the ball player object to go around a loop the loop like a hotwheels car. I knew that rb.addForce() wouldn't work, since it pushes the ball in one direction...
View ArticleLimit the velocity of an object after addforce
I'm using the code below to drag the mouse on the screen and make the object move via addforce, and works like a charm, but the problem is that unless I drag the mouse in the opposite direction, the...
View ArticleHow to make add force/Physics consistent between editor and builds?
I have researched and looked at all other posts with no success. I am creating a network game where a dice roll is involved, I have the server generating random floats and then sending that information...
View Articleadding force
how can i make this script move objects by force, rather than by changing there position? private GameObject PullOBJ; public float PullSpeed; public float objRotationSpeed; public float rotation;...
View ArticleC# script not working
here is a script i put on a trigger collider on my tornado which does the physics for my tornado. there are no errors in the script. but it isnt making my rigidbodies do anything. whats the problem?...
View ArticleHow to reach a specific max speed with AddForce() ?
Hello, Context : 3D, top view, moving a cube, using gravity. My end goal is to create car movement with this cube (and whithout wheels). To move the cube, i am using AddForce() and AddTorque()....
View ArticleRigidBody properties Not Working.
Rigidbody Properties not working...check out my code and help me get through it. It shows a error line under rigidbody.AddForce using System.Collections; using System.Collections.Generic; using...
View ArticleHow to control easing in Mathf.smoothDamp?
Hi guys I'm using smoothDamp to move between amounts of acceleration and braking on a vehicle. It's my first game and I've not used smoothDamp before so I'm hoping someone can explain how I might...
View ArticleHow to add force on curved swipe??? football
Hi I am a beginner in the field of UNITY I creat a soccer game kick for Android I want to shoot the ball and create an after-effect resulting in a curved path with transforme I could not get to the...
View ArticleTrouble with Ray & Raycasting and AddForce()
In my code, when you click on the screen, the sphere starts in the direction of the finger tap. It uses raycast. The sphere is launched only if the raycast hit contains information about the...
View Article