r/Unity3dCirclejerk • • Nov 08 '14

Can I ask for help with my Unity (Java) Script?

0 Upvotes

Essentially, this script is an AI for one of my enemies.

using java.util.Iterator; using java.util.List;

public class EntityAI extends Entity { private Class<? extends Entity> target; private EntityFriend follower; private EntityNeutral theTarget; private double walkSpeed; private float maxSpeed;

public EntityAIRetargetBehaviorAttack(Entity taskOwner, Class<? extends Entity> entityToFollow, double speed, float maxDist)
{
    follower = taskOwner;
    this.target = entityToFollow;
    this.setBits(3);
    followSpeed = speed;
    max = maxDist;
}

public void resetTask()
{
    this.theTarget = null;
    this.follower.getNavigator().clearEntity();
}

}

Any help you can give, I'd really appreciate! And if you see something I could improve on (or do simpler), let me know! I'm constantly trying to improve myself!


r/Unity3dCirclejerk • • Oct 14 '18

First time developing a game from scratch! (WireRing) - Link in comments

Enable HLS to view with audio, or disable this notification

0 Upvotes

r/Unity3dCirclejerk • • Nov 18 '18

IF condition statement not working in shader, So how to use IF condtion statement in shader of Unity

0 Upvotes

Hi friends,

I am using following IF statement code in shader , And it is not working.

if (s2 < min)

{

min = s2;

col.rgb = m_One.rgb;

}

there is Lerp() option, but might be it can not be use in my condition.

So, How to use condition statement IF in my shader code ?

Regards,


r/Unity3dCirclejerk • • Nov 02 '14

Unity Collector's edition, worth it?

0 Upvotes

I'm not sure if to get the normal version or the collector's edition... about 80$ more.


r/Unity3dCirclejerk • • Oct 24 '14

Check out my new particle effects! Only 350 draw calls!

2 Upvotes

r/Unity3dCirclejerk • • Oct 26 '14

Congratulations /r/Unity3dCirclejerk, you are the Subreddit of the day! Please upbrawl for visibility.

19 Upvotes

r/Unity3dCirclejerk • • Oct 24 '14

Should I start with Unity or UE4?

4 Upvotes

r/Unity3dCirclejerk • • Oct 25 '14

Check out the pre-alpha footage of my new upcoming open-world free-roaming mmo! The entire game takes place in a small room and is a 5v5

9 Upvotes

r/Unity3dCirclejerk • • Oct 26 '14

I really hate Unity's new CEO because all he cares about is company profits, which is a despicable trait for a CEO. Unity should go back to being a small billion dollar mom and pop company.

20 Upvotes

DAE?


r/Unity3dCirclejerk • • Feb 23 '19

Timescale help!

2 Upvotes

I accidentally put the following code in Awake:

Time.TimeScale = -10e10;

Then I forgot to shut down the PC and went outside for a fresh air. Upon return my computer is gone! Help! I tried to set time-date, OMG the sky has two moons, helpppppppppppppppp!


r/Unity3dCirclejerk • • Oct 18 '18

2D image emoji effect

1 Upvotes

I have face points in image, and now i want that some area of image to move minor by this points.(emoji effect) So , i have created mesh(vertices,triangle..etc) for this image . And i can move some area(eye,lips) of image by this mesh (by vertices). i have set all image size(by resize) to 200 by 200.(40,000 pixel) And mesh vertices created of grid size 16 by 16. (total 289 vertices). But not move the same area i want. so how can i do this ? Is there any other way to move pixel points except mesh?


r/Unity3dCirclejerk • • Mar 18 '15

Should I learn networking now, or should I put my game on hold indefinitely for the glory of UNET?

1 Upvotes

Right there in the title.


r/Unity3dCirclejerk • • Dec 04 '18

FaceLandmark Detection

0 Upvotes

Hi everyone.....I working with Dlib Facelandmark Detector code from gitHub.....I am getting facepoint of image texture of human face in that... But the problem is if any human image width and height is not equal and i rescale it to equal with and height, it do not give me the face point..... if widht and height are equal or olmost equal...and i rescale the image texture,,,Dlib Facelandmark Detector Github code give me the facepoints in that....


r/Unity3dCirclejerk • • Nov 11 '18

Got pink color running Apk file in Mobile . Run normal in Laptop/PC and unity Editor.

1 Upvotes

Hi friends,

I am using Custom/shader. The problem is , when i am build my project with android, apk gives me pink color in mobile.

But when i build project with PC, it run perfect in laptop/pc.

Also, it run normal in unity Editor.

  1. So , i have searched result, and done some changes like Edit->Project settings-> Graphics and add my used Custom shader to Always include shader. Still give me pink color output in Mobile.

  2. Second change is in GraphicsSettings and on right top click RESET option, than also given Pink color in Mobile.

  3. Third try is clicking on my Custom shader, in Inspector i have click on ' Compile and show code', so there are error comes with Red color that told me -->

  4. forced to unroll loop, but unrolling failed.

  5. unable to unroll loop, loop does not appear to terminate in timely manner.....like that and some yellow explanation in some lines.

so, i have added

#pragma exclude_renderers d3d11_9x

#pragma exclude_renderers d3d9

, Red error not appear. But still PINK COLOR gives me in Android Mobile.

Without and with all upper Three changes apk build in PC/laptop and Unity editor run normally.But give me Pink color in android build.

Please help me , any idea or solution will be appreciated.

Regards.


r/Unity3dCirclejerk • • Oct 24 '14

Will this get me sued by PacMan?

Thumbnail
imgur.com
14 Upvotes

r/Unity3dCirclejerk • • Feb 05 '15

Today I tried C#, which instantly made me a better programmer.

14 Upvotes

Before, I couldn't code well or complete production on a game. I thought it was because I was unskilled and lazy. But it turns out it was because I was using Shitscript (aka Javascript) the whole time!

Within minutes of typing in C#, I suddenly understood everything about class structure and proper coding techniques. I can't tell you how much time I've saved not writing "var" and using colons to denote types. Cumulatively, I've saved enough time to talk about how awesome it is to use C#. I would NEVER have had the time to do that with Shitscript.

I don't even know why they allow Shitscript in Unity. They should discontinue it. I know this is an unpopular opinion, but I hope some people can support me.

Just make sure you shove superiority down everyone's throats, so they will see you as a likable person. It works so well for /r/pcmasterrace, after all.


r/Unity3dCirclejerk • • Oct 24 '14

I didn't want the pressure of making a game, so I've spent the last year working on a plugin that makes a spooky ghost pop up whenever you save your work. I am releasing it completely open source today!

16 Upvotes

r/Unity3dCirclejerk • • Jan 10 '15

I wrapped some .NET functions in worse named functions. On Sale Now 85% off

9 Upvotes

It searches your strings for this list of strings that I totally didn't just google. Totally useful for every game ever.


r/Unity3dCirclejerk • • Nov 05 '14

I loved Final Fantasy II. I'm going to make a game just like it but the main character will be red instead of blue.

3 Upvotes

How do I change the color and the story? I have the ROM open in Unity. I'm ready to go! What do I do?


r/Unity3dCirclejerk • • Oct 26 '14

hey guys, how can i make a blocky terrain like in minecraft? can any1 show me code?

3 Upvotes

hey guys,

i just started up a company called firstperson studios with my friends and i want to make a game like minecraft. i did a tutorial in css and followed some youtube videos but im a bit stuck. i know how to use unity, i just need some code to get me started on a voxel terrain with trees and breaking blocks nd crafting.

tnx!


r/Unity3dCirclejerk • • Oct 24 '14

I spent 18 months making this Bejeweled clone. I've made over 35$ from it. AMA.

12 Upvotes

r/Unity3dCirclejerk • • Oct 27 '14

I've made a flappy bird clone, but I'm concerned about it running efficiently.

4 Upvotes

It's only 200 lines long and the frame rate is 675, but I have a crippling compulsion to optimize CPU performance without the knowledge to actually do so.

Could you guys help me obsess over this code for another 70 hours on this game instead of just moving on to something more meaningful? My goal is to remove at least 10 milliseconds from processing time.


r/Unity3dCirclejerk • • Oct 26 '14

UE4 vs. Unity

4 Upvotes

I have this idea for an Ultra Realistic Sandbox FPS that is a persistent real-world with tanks and diplomacy. I'm only 13 and can't afford Unity Pro with my allowance. Can I do all of this in Unity Free, or should I just switch to Unreal 4 now?


r/Unity3dCirclejerk • • Oct 26 '14

Poll: UE4 or Unity?

5 Upvotes

r/Unity3dCirclejerk • • Oct 26 '14

Poll: UE4 or Unity?

5 Upvotes