The tag has no wiki summary.

learn more… | top users | synonyms

4
votes
1answer
334 views

How to transform mesh components?

I am attempting to transform the components of a mesh directly using a 4x4 matrix. This is working for the vertex positions, but it is not working for the normals (and probably not the tangents ...
3
votes
1answer
767 views

How rotate a 3D cube at its center XNA?

I try to rotate a 3D cube on itself from its center, not the edge. Here is my code used. public rotatemyCube() { ... Matrix newTransform = Matrix.CreateScale(scale) * ...
3
votes
1answer
306 views

Shear transformation in the projection matrix?

I am trying to understand what the shear transformation (l+r/r-l & b+t/t-b) is actually doing in the projection matrix? The only thing I got till now is headache :) Can you please help?
3
votes
1answer
4k views

Rotate object to always face camera

I'm trying to make a TextMesh appear when ever an enemy prefab is hit. I currently have this functionality working. However, the text doesn't face the direction the players camera is looking. At the ...
2
votes
4answers
983 views

(unity) move the world or the character

I'm making a game like this: https://www.youtube.com/watch?v=hO7573lphqI wherein a 3D ship is flying around on a 2D plane. From the player's perspective, the ship will stay stationary in the center ...
2
votes
1answer
441 views

How to translate swipe gestures into rotations?

I am making a snake game. I want to rotate my snake in the direction specified by swiping on the screen, the directions are limited to orthogonals (90 degree increments). It's an android game. Can ...
1
vote
1answer
14k views

Correct way to use a GameObject.Find method in Unity C#

I have been following along with a Lynda.com video course to familiarize with Unity. I am currently attempting to grab a reference to a scene's First Person Controller's transform as follows: ...
1
vote
1answer
3k views

Unity3D Drag Object with Mouse Gives Invalid Position

I am trying to implement a simple script to drag a GameObject with the mouse in Unity. However, when the position of the object is updated with the following script, I get an error saying: ...
1
vote
1answer
220 views

Skeletal Animation with UV seams

I have a UV-mapped model that I am about to animate and load into my game. Like most unwrapped models, I have several UV seams. In order to render the model correctly, I split each vertex along the ...
1
vote
2answers
94 views

Making a cube slowly rotate 180 degress one time on a mouseclick

I am new to C# and new to Unity. I made a script that can turn a cube slowly one time after a mouse click but I feel like its probably wrong for using FixedUpdate. Is this OK or is there a better way? ...
1
vote
1answer
71 views

Problem with 2D matrix transform og shapes

I have set myself onto the task of creating a class BaseObject, which represents a graphics object with an associated shape as the member variable shape, which is a pointer an object Polygon. I'll ...
1
vote
1answer
52 views

How can I transform a Point2f with a matrix on Android?

I'm developing for Android and I'm using the android.renderscript.Matrix3f class to do some calculations. What I need to do now is to now is to do something like mat.tranform(pointIn, pointOut); So ...
1
vote
1answer
490 views

Pygame's rotation methods have crippling issues, but is it me or Python's pygame?

http://www.youtube.com/watch?v=lNJFxvR6ex8&feature=youtu.be On rotate and rotozoom, can't find fixes on these on the internet, anywhere. Basically, the video is showing 4 things in this order: 1. ...
1
vote
1answer
165 views

Rotate an image in a scaled context

Here is my working piece of code to rotate an image toward a point (in my case, the mouse cursor). float dx = newx - ploc.x; float dy = newy - ploc.y; float angle = (float) ...
1
vote
0answers
40 views

parented/constrained object transform lags when moving character in unity3D

Hi I have a simple raycast-base gun that emits particles along it's path to fake bullets. Whenever I move the camera/character- the particles are misaligned, as well as anything else I try to modify ...
1
vote
2answers
118 views

Why does my ship look like it's going backwards instead of fowards? [closed]

I'm making an Asteroids-clone based on this tutorial. I'm stuck on the 5th part of the tutorial. For some reason my ship is going backwards instead of forward or it looks like its going forward, but ...
1
vote
0answers
434 views

Move parent according to child axis in Unity?

Can I ask my parent to move according to the child axis? This means if I turn right, then right again, the parent has to be at 180° from its original position, and not only at 90° (because "Right" ...
0
votes
2answers
106 views

Need transform matrix to translate the center of the view to a custom position within the target texture

My problem is as follows: I want to use a single render target texture for drawing 16 viewports where I want to display the 16 different combinations of the marching squares algorithm with my 3D ...
0
votes
1answer
41 views

How can I rotate a Transform over a specified time in a single line of code? [duplicate]

How can I rotate a Transform over a specified time in a single line of code? I have had a lot of trouble with this in the past. I wrote a script which rotates a Transform by a specified rotation ...
0
votes
2answers
3k views

Unity scaling instantiated GameObject at Start() doesn't “keep”

I have a very simple scenario: A box-like Prefab which is imported from Blender automatically (I have the .blend file in the Assets folder). A script that has two public GameObject fields. In one I ...
0
votes
1answer
26 views

Unity Issue with Vector3 and Transform

So I am currently running into this error Cannot implicitly convert type 'UnityEngine.Vector3" to 'Unity.Engine.Transfomr' I am not to sure on how to fix this issue because I am very confused on ...
0
votes
0answers
32 views

Java Slick2D rotating a Shape using transform(Transform.createRotateTransform())

I have spent most of the day trying to debug this tiny piece of code, and I can't for the life of me figure it out. I'm making a pong game for the Mini Ludum Dare currently going on. I am programming ...
0
votes
1answer
249 views

Libgdx, how do i get the translation and rotation of a node from a model instance?

I have a model instance of a character, and a model instance of a sword weapon. THe character has a node on his right hand so he can "carry" the sword. Right now I use this code so the sword's ...
0
votes
0answers
70 views

How to translate vertex buffer coordinates in 2D

I am trying to (using a 2D Directx9 engine library) rotate/translate a set of points in a vertex buffer. I understand how this would be done in a 3D system - i.e using the vertex shader stage of ...
0
votes
1answer
289 views

How do I animate Unity GUIComponents?

I want to transform my GUIWindow from the bottom of the screen to the middle whenever the user presses a button. How can I do this?
-1
votes
1answer
60 views

If object is bellow another object… do something [closed]

I have 2 objects in scene. When pillar is bellow target, pillar object needs to animate. I get this error: "NullReferenceException: Object reference not set to an instance of an object". var pillar : ...