@Phantom_TheGame
Fear the Phantom (game in bio)
6 months
I feel like I'm getting the hang of Unity. My code looks so clean and professional now! I think the 3D models have too many polygons, though, since my FPS is always lower than like 7
Tweet media one
164
60
2K

Replies

@Phantom_TheGame
Fear the Phantom (game in bio)
6 months
I'm working on an open world horror game with lots of gore and strange characters. If you want to help me out, please consider wishlisting the game and following me:
1
1
74
@zlumer_eth
zlumer
6 months
@Phantom_TheGame This code is great, and the replies from people who didn't get the joke are hilarious 🥲
1
0
1
@Phantom_TheGame
Fear the Phantom (game in bio)
6 months
@zlumer_eth I love it 😂
0
0
1
@MrGemezl
Gemezl
6 months
@Phantom_TheGame This is pretty good. But I personally would do the loop a 2nd time. Just to make sure that it really found the nearest enemy. I call it a pro developer move 🤓
2
0
146
@Phantom_TheGame
Fear the Phantom (game in bio)
6 months
@MrGemezl Yeah, I was actually worried the code might miss the nearest enemy. Could do a second loop with another variable of Enemy and do a "if(nearestEnemy == nearestEnemyJustMakingSure) { bla bla}", and probably put it all in a while loop until those two are the same
2
0
71
@FreyaHolmer
Freya Holmér
6 months
@Phantom_TheGame you can actually make this a little tighter by measuring to its vertices instead of just the origin there's also an optimization for distance checking using squared magnitude! here you go:
Tweet media one
31
18
710
@Phantom_TheGame
Fear the Phantom (game in bio)
6 months
@FreyaHolmer A piece of art. Truly wonderful. Thanks for teaching me better ways, I thought I had already mastered Unity but apparently not.
2
0
116
@DeSerrateGame
DeSerrate
6 months
@Phantom_TheGame Big ouf... I'm going to get back to you with a list of things to try out.
1
0
8
@Phantom_TheGame
Fear the Phantom (game in bio)
6 months
0
0
5
@omoflop
omoflop ❤️🧡🤍💜
6 months
@Phantom_TheGame I have never seen anything like this, your work should be framed and immortalized in a museum
1
0
8
@Phantom_TheGame
Fear the Phantom (game in bio)
6 months
@omoflop Omg is it that good? 😍Thank you!
0
0
4
@ZZhako
Zhakami Zhako
6 months
@Phantom_TheGame I have concerns. 😅
1
0
3
@Phantom_TheGame
Fear the Phantom (game in bio)
6 months
@ZZhako Oh, did I forget a semicolon somewhere?
1
0
6
@elvismdd
elvis
6 months
@Phantom_TheGame have you tried GetComponent<Transform>().gameObject.transform? its usually faster
2
0
57
@Phantom_TheGame
Fear the Phantom (game in bio)
6 months
@elvismdd Good find, I might update my code to that
0
0
16
@sefless
Sef 🌈
6 months
@Phantom_TheGame This would immediately fail any code review. nearestDist should be initialised to float.MaxValue. Apart from that, it’s perfect! 👌
2
0
42
@Phantom_TheGame
Fear the Phantom (game in bio)
6 months
@sefless Ohh I was actually gonna do float.MaxValue, but I though it would require a lot of ram since the number is so high. Thanks for explaining though
2
1
69
@DCAnonBro
DC
6 months
@Phantom_TheGame It's colourful i'll give you that much....
1
0
1
@Phantom_TheGame
Fear the Phantom (game in bio)
6 months
@DCAnonBro My teacher used to say "the more color, the more dollar"
2
0
1
@OYHDev
SkullCrusher
6 months
@Phantom_TheGame try putting the FindObjectsByType INSIDE the for loop :)
1
0
7
@Phantom_TheGame
Fear the Phantom (game in bio)
6 months
@OYHDev Ohhh why didn't i think of that
0
0
3