All Questions
10 questions
0
votes
1
answer
174
views
3D Dark Souls lock-on code: Player moves around target in a spiral, not perfect circle
I'm working on a 3D game in Unity that requires lock-on, or Z, targeting found in games like Dark Souls and Legend of Zelda: Ocarina of Time.
The code that I have achieves my intended goals fairly ...
0
votes
0
answers
32
views
In Unity, how can I check whether two objects are sliding on each other or rolling against one another?
I'm coding a script to make objects emit appropriate noises on contact with other objects, with different sounds for isolated impacts, sliding, and rolling.
Impacts work just fine, but for the other ...
1
vote
2
answers
728
views
Why is Vector3.ProjectOnPlane() "drifting" further from desired rotation on steep slopes
I'm writing a simple player movement script in Unity 3D, and I've been using Vector3.ProjectOnPlane() to accomplish slope/ramp movement. For the most part, this ...
1
vote
1
answer
245
views
Make a rigidbody walk around a planet
I have my character with a rigidbody and attracted by the planet. I am trying to move it with its velocity. I tried this script:
...
1
vote
1
answer
6k
views
What are the dangers of setting rigidbody velocity directly for movement and what are the alternatives
I'm playing around with Unity, trying to make a neat 3rd person platformer movement system using rigidbodies so that I may in the future implement things like pushing boxes/physics objects, grappling ...
-1
votes
1
answer
210
views
How would I detect a collision between a rigidbody and a static
I have an object with a rigid body. How would I go around detecting collisions between this object and any other object with a collider on it?
I know you can enable/disable collision detection (https:/...
0
votes
0
answers
84
views
Unity: Stop Rigidbody from moving in one direction [duplicate]
I move a rigidbody by moving the mouse.
I want my rigidbody to stop moving in the x direction when it exceeds a certain range. To do that I set the x velocity to 0. If I log the velocity, the x-value ...
1
vote
1
answer
1k
views
Can a GameObject be both 2D and 3D?
In all Unity games I saw so far, every object is either 2D (with RigidBody2D and Collider2D components), or 3D (with RigidBody and Collider components). This makes sense, but I wonder if there is any ...
2
votes
1
answer
1k
views
How to add constant force to player with sperical gravity planet.?
I have a planet and character. My player move perfect around planet with pressing key like 'w','s','a and 'D'. I want to move my player on every frame with same force around sphere. I try plane ...
1
vote
1
answer
6k
views
Unity 3D Move Object with RigidBody
I have added RigidBody component as well as Mesh collider to an object moved with keyboard. I know that it the object will go through another (with RigidBody and Mesh collider too) if I use transform ...