Quantcast
Channel: Questions in topic: "transform.transformpoint"
Browsing all 29 articles
Browse latest View live

Distributing agents over an area

Hello, I have multiple agents (hundreds) in my scene, heading to different areas. An area is a GameObject with a cube and a mesh renderer, material is translucent. At start each agent have one (random...

View Article


Why transform.TransformPoint(transform.position) prints differently than...

From a script attached on an object, which actually casts a Linecast from itself to a "target" object, I instruct to print the following two statements: print...

View Article


Comparing World Positions

So I've been trying to find the closest node to a certain object: void FindClosestNode (Transform comparitive) { float closeDistance = Mathf.Infinity; GameObject closestNode = null; GameObject[] gNodes...

View Article

Change vertex's world position

Hi, I'm trying to create bumps on my mesh. To do so, I have to tell every vertex of my mesh to change its "y" value. It worked fine, when I had one mesh. The problem started when I created chunks. So...

View Article

Elegantly flattening a relative vector

Vector3 zed = other.transform.InverseTransformVector (transform.position - other.transform.position); zed .x = 0f; zed .y = 0f; zed = other.transform.position + other.transform.TransformVector (zed);...

View Article


Version of Transform.TransformPoint which is unaffected by scale?

Is there a scale-independent version of Transform.TransformPoint? I am trying to convert a position to a localized position relative to an object, and then round that position. The problem is that with...

View Article

Having trouble with the transform.TransformPoint function

Here's my code: RHS = transform.TransformPoint(2, 0, 0); Debug.DrawRay(transform.position, RHS, Color.blue, 20); When I ran this, I expected to get a line drawn from the gameObject's transform directly...

View Article

transform.transformpoint not returning correct value

Like the title says, transform.transformpoint isn't returning the correct value. For some values of the variable point, it's off by a little, some it's off by a lot. foreach (PolygonCollider2D col in...

View Article


Can someone please explain the difference between TransformPoint and...

I've read a few different posts about this on StackOverflow and the Unity forums, but I still don't understand what's happening with these functions. Let me attempt to briefly explain what I do think I...

View Article

Browsing all 29 articles
Browse latest View live


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