All Questions
94 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 ...
0
votes
0
answers
23
views
I want to change the tint of my panoramic skybox for daylight cycle
So i am trying to create a daylight cycle, where it switches between two panoramic images. The change happens slowly one over 2 minutes and the other over 3. During this the fog and light changes ...
0
votes
1
answer
100
views
Kinematic "dive bomb" motion toward a moving target
Context: infinite runner, stationary player, obstacles move toward player. I have an asteroid that currently Vector3.MoveTowards a moving target e.g. a "rubble&...
0
votes
1
answer
276
views
Understanding transform.forward vs. Converting World Space Forward to Local Space for Ray Drawing
I'm working in Unity and trying to visualize the forward direction of a GameObject. I came across two approaches:
Using transform.forward:
...
1
vote
1
answer
114
views
How to call every method with a certain name from a set of classes in C#
I have the following case:
I have a class called App.cs and here I have a function called Render, that runs once every frame:
...
0
votes
0
answers
137
views
How to stop object with joints flying away at high velocity on collision?
I am currently making a game where the player constructs vehicles out of blocks. I am achieving this through having rigidbodies for each 'group of blocks' separated by 'function blocks' (e.g. motors, ...
0
votes
0
answers
86
views
How to change the locomotive status from moving in a spline to moving in the next spline when it meets the next rail?
I want to make a train that can move in a curve. I have downloaded a Train Spline Walker unity package.
That package can generate a spline, and the train's locomotive will move in the spline with a ...
0
votes
1
answer
144
views
Gap between two 3D objects in Unity
Quick question related to Unity: if I have two objects (A and B) to create some tunnel, how can I make a constant gap? I thought of having A and B instantiated with a random value to start with; ...
0
votes
1
answer
800
views
Mirror a 3d position vector3 based on a vector3 and rotation
I have a point in 3d space and a coordinate with angle (a imaginary plane)
Here's my input data :
A ) a vector3 which defines a position in world space
B ) a vector3 which defines a mirror position
C )...
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 ...
0
votes
1
answer
61
views
A point on a sphere surface needs to be converted to origin coordinate
I have a central point, a planet is moving around it on the orbit A (a circle)
And the planet is rotating at a certain speed on its axis ( B )
I have a Data Structure representing the Base Mesh ...
1
vote
1
answer
718
views
How to scale all meshes of various scales to a unit scale
I have a few objects with different scales i want to make a scene where all objects are scaled proportionally to everything else, something like a normalize function for a mesh.
How would I go about ...
-1
votes
1
answer
89
views
I want to use a number that I got using Debug.Log, and use it later in a game over screen to show a score
How can I save this number as a variable to use in a game over screen?
This is my code to get the number
public void StopCount ()
{
Debug.Log(disRun);
}
0
votes
0
answers
33
views
How to unlock a level using a textbox question (with one correct answer)?
I'm currently working on a 3D Unity game that has 3 levels, but each level has to be unlocked by answering a question to walk through the door leading to the next level. I have a next level trigger ...