Tag Info

New answers tagged

-1

if you haven't already gotten this figured out, a simple way to do it without complicated path-finding is to check the position of all of the enemies vs yours. If the enemies are below you position, move them up. If they are too far to the left, move them right. It's as simple as that. Example: foreach (Enemy enemy in enemies) if(enemy.x > player.x) ...


2

If you’re familiar with CSS spriting,it can be done the same way with SVGs. Unlike the icon fonts technique, you’re not bound to one color. You can use gradients, clipping masks, and transparencies while still keeping your mark-up and CSS clean. Chrome supports SVG with a few minor bugs and so does the latest Mozilla browser these are the ones that most ...


0

I have come up with a solution and it seemed to be buried deep within my college memory. I achieved what I wanted through a Unit Circle! Basic calculus/geometry seemed to be the correct way for me to come up with a working solution. I took the x and y translation points of the sun and put them through the unit circle equation. See ...


3

There is nothing inherently wrong with your original code when it comes to normalization. The only problem can be with meshes that do not properly share vertices, meaning your normalization code will always normalize the vertices that belong to a single Triangle. If you wish to fix such a mesh, you should either: Weld all vertices during import stage ...


1

The problem is that you need to actually average the normals. I see that you are accumulating a sum of each face normal that a vertice is apart of but I don't see where you actually divide it by the number of normals that you summed. What you would probably need to do is have another int array of the same size as your normal array and increment them after ...


1

From the Unity documentation: Moved A finger moved on the screen. Stationary A finger is touching the screen but hasn't moved. You are checking to see that the fingers are both station and have moved. It is either one of the other. Your code inside the if statements will never run. I see what you are trying to do, but it does not wait after one if ...


-1

Looks like you want to implement stteringbehaviours. Take a look a chapter 3 of this book. I think it would make your game look more natural if you implement it this way.


0

1.) You need to update _lookRotation when the mouse is clicked or it never changes so your agent will never look at a new location. Simple Coroutine Example: IEnumerator RotateAgent(Quaternion currentRotation, Quaternion targetRotation) { IsRotating = true; while(current rotation != targetRotation) { transform.rotation = ...



Top 50 recent answers are included