If you're using a 'look at' function that takes a position and a target point, you should be able to compute the adjusted target point as follows (pseudocode):
vector3 forward = target - position; vector3 adjusted_target = position - forward;
Not Telling
Posted by scgames
on 17 June 2011 - 04:46 PM
vector3 forward = target - position; vector3 adjusted_target = position - forward;
Posted by scgames
on 15 June 2011 - 10:30 PM
Ogre is a rendering engine only, not a game engine (AFAIK, at least). It can certainly be combined with other libraries though (e.g Bullet for physics, etc.) in order to create a framework for a game.- Ogre: a full fledged game engine.
Posted by scgames
on 15 June 2011 - 10:41 AM
Posted by scgames
on 14 June 2011 - 09:49 PM
Posted by scgames
on 12 June 2011 - 09:12 AM
Posted by scgames
on 09 June 2011 - 05:31 AM
Certainly you can use malloc (in C and C++) and new (in C++) in your programs. In fact, that's probably exactly what you'll want to do unless you have a specific need for a custom solution. (Even then, you might look into existing solutions, such as boost::pool if you're using C++, rather than implementing something from scratch.)I understand why you cannot use memory dynamically allocated commands in the C program i.e.(new and malloc) because they are not as efficient as creating your very own.
Posted by scgames
on 08 June 2011 - 08:32 PM
Only the OP can tell us for sure, but I get the impression the question is practical in nature. For one thing, the thread title is 'C++ Macro Problem', which suggests the question is specifically in reference to C++ rather than C.I'm guessing it's a theoretical question. The practical reason is if you needed to inline functions in older (e.g. C89 and K&R C) code.
Posted by scgames
on 08 June 2011 - 07:57 PM
Unity does not currently support Linux.Unity:
Can be run on both Windows and Macintosh, and the end-result games can be played on either platform (unsure about Linux/Ubuntu/etc.)
You should be able to find most if not all of the answers you're looking for here, here, and here.Haven't yet found if they charge you anything.
Posted by scgames
on 08 June 2011 - 07:51 PM
Posted by scgames
on 06 June 2011 - 08:33 PM
Do you still have any of the 'corrective' code in place? That is, are you modifying the angle returned by atan2() in any way?You're right about that. Yet, ironically, doing it the right way brings worst results! Now the image never faces the direction it's going! What's going on? O_o
Posted by scgames
on 06 June 2011 - 07:30 PM
Assuming you're using standard conventions (which it sounds like you are), the above should probably be:float radians = atan2(x_vel, y_vel);
float radians = atan2(y_vel, x_vel);
Posted by scgames
on 05 June 2011 - 11:19 AM
What if the OP isn't using DirectX/Direct3D, or is targeting platforms that don't support it?you might be best using directx D3DXVECTOR2 for this , cause all the operators are overloaded, makeing maths so mauch easyer
Posted by scgames
on 04 June 2011 - 10:24 PM
No need to delete - the question and the link you provided may prove useful to someone in the future :)Is there a way to delete a topic? I can't find it otherwise I would.
Posted by scgames
on 04 June 2011 - 03:32 PM
Find content