Quantcast
Channel: Latest Questions by Grievemourne
Browsing all 51 articles
Browse latest View live

How can i instantiate a mesh at a hit point?

Very new to both scripting and unity and I can't figure out how to spawn something as simple as a sphere at a location, even though the script I'm using manages to spawn particles there. Here's the...

View Article



How do I make sure a object faces a certain direction?

I've been try to rotate something but I don't want it to rotate past a certain point, I just want to have the object rotated a set amount, say, facing north, but if the script is triggered again, it...

View Article

How do I get a variable from another script and share the value of that...

I've been told to set variables to public, which I have - but I'm not sure if I've understood correctly that I have to have the scripts on the same game object? Is there no way to call out the...

View Article

How do I rotate accurately over time while ignoring other axis's?

I have a rotation that I want to happen over time, but can't really use slerp or lerp (as far as I know), because I need to allow for dynamic movement and rotation over that period. I've currently been...

View Article

How do I edit springjoint components in script?

I'm trying to create a pickup script through the use of springjoints and have been trying to set the 'Connected Body' to an object, and detach it later via script, and I'm having trouble reading the...

View Article


why is part of my script being ignored?

sorry about the title, I'm not sure how to specify it in there alone. I have narrowed the problem down to: if (hit.collider.gameObject.layer == "WestWallTrigger"){ Instantiate(myBullet, hit.point,...

View Article

Is there a way to get the character controller to rotate?

I've discovered that a problem of mine is that when I rotate my character, the controller isn't rotated, which creates problems. Is there any way to rotate the controller along with the mesh?

View Article

Do physics objects automatically sleep?

I have a problem with physics objects not reacting to certain things. I'm changing the universal gravity and the objects don't seem to react at all until I poke them in some way. It's like they fall...

View Article


How do I affect every object with a certain tag?

I've got several objects under the tag "Moveable" and I need all of them to wake up on a certain action. Is there a simpler wake to get multiple rigidbodies to wake up? Is there a way for me to affect...

View Article


Is there a way to get rotation data for single axes?

I'm struggling to find a way to store rotation data, and need them to be stored individually and changed individually. something like transform.rotation.y would be useful.

View Article

Is there a way to make child objects unselectable?

The title pretty much says it. My workflow is currently getting very messed up from child objects constantly being selected instead of the parent, when I want to move the parent around. I want to be...

View Article

Are there more options to rotation 'Space' relativity?

I have an object that I would like to rotate based on the axis of a different object, but at its own transformation point. Ideally, I would use something along the lines of...

View Article

How do I rotate a quaternion with euler angles?

I think my mind is just in a knot at the moment, since I feel this should be fairly easy. Right now I'm trying to rotate a quaternion by adding a few degrees to its y axis, so that its rotation is...

View Article


Why is my hinge joint acting stiff with no spring?

I am changing the gravity of the level and the hinge joint behaves like a chain (like I want) when changing the direction once, but after changing the direction to be 90 degrees of that, it starts to...

View Article

Is there a way to project a vector3 onto a plane?

I'm aware of being able to do so onto another vector, but I need to be able to do functionally the same along 2 vectors, or a plane, decided by an object other than the one I want to move along the...

View Article


Why does my Physics.gravity revert value change when accessed by one script,...

Wow, that's a verbose title. Physics.gravity = -other.transform.up * GRAVITYCONSTANT; This is the line I'm using in one script, which simply doesn't work. looking at the data of the debug log, it tells...

View Article

Is there a way to have rigid bodies collide, but not transfer any force?

At least that's in essence what I need. I have a rigidbody platform that I need to move another rigidbody across, but as I try to move one across the other, the rigidbody platform starts moving due to...

View Article


Is there a way to stop a rigidbody from moving in a specific direction?

The way I would usually do it is by setting rigid.velocity = new vector3 and then zeroing out one of the directions I don't want the object to be able to continue in, but since the direction can be...

View Article

Is there a way of seeing which script accessing each other?

I've got a feeling that one of my scripts is modifying variables or using functions in another script; I now want to stop that but I'm afraid I might have lost track and am trying to figure out if...

View Article

Why would a boolean change when checked by another script?

Using debug.log to check the boolean every update, in the script holding the boolean it finds it as false - in another script checking the same boolean, it finds it as true. This is thoroughly...

View Article
Browsing all 51 articles
Browse latest View live




Latest Images