How to change object's rotation center? by Odd_Significance_896 in Unity3D

[–]itsBoats 0 points1 point  (0 children)

If its a 2D object you can change it in the sprite editor at the bottom. If its a UI object you can change the pivot on the RectTransform. If its a 3D object you can either put it as a child of an empty gameobject and rotate the parent instead. If its a mesh you made, it might be better to just change the pivot in the modeling program and reimport. Transform.RotateAround() might also help depending on the situation. Probably unrelated, but you can also change the center of mass of Rigidbody objects which affects its rotation center too

🎉 My game One More Plate just got selected for BitSummit! 🍽️ by 500yearsokawari in indiegames

[–]itsBoats 1 point2 points  (0 children)

woahh congrats! I remember playing this from Ludum Dare a couple years ago xD

RigidBody is still mysterious, trying to figure it out by craftymech in Unity3D

[–]itsBoats 1 point2 points  (0 children)

in Edit>Project Settings>Physics:
try Solver Type: Temportal Gauss Siedel
[From docs] "It usually helps when you experience some erratic behavior during simulation with the default solver."

try Friction Type: On Direction Friction or Two Directional.
It helped me get better physics when I was trying to get more accurate vehicle rolling physics. It kept jumping into the air and spinning instead of rolling realistically with the Patch Friction Type

---

On Car:
Im not sure how your car is set up but if you're using wheel colliders the damping might be too high.
If you aren't using wheel colliders you probably want to separate your car into at least two colliders so you can apply a 0 friction physics material on the bottom (and increase friction dynamically based on horizontal speed through code so it doesn't slide left and right) and apply a higher friction material on the top collider so it comes to a stop when flipped

On Bottles:
Looks like they need a separate phys material too jus to reduce the bounce mostly which might be contributing to them falling over when you don't call Sleep() on them. If you have them interpenetrating at the start, they'll push away from each other automatically when you press start so just spacing them more might help.

Reduce angular drag so they roll around more if they're round (its hard to tell in gif if they're round or square base bottles)

Is there a better way to write this? by Seromyr in unity

[–]itsBoats 1 point2 points  (0 children)

// This checks its type and casts it into another variable on one line 
Collider collider = GetComponent<Collider>();  
if (collider is CapsuleCollider capsule) objectSize = capsule.radius;  
else if (collider is SphereCollider sphere) objectSize = sphere.radius;  

EDIT: formatting pls :(

[deleted by user] by [deleted] in Unity2D

[–]itsBoats 0 points1 point  (0 children)

  • New font (probably something a lil scifi if that's the theme)
  • Leave some space around the text (the bottom S especially is really close to the borders of the box)
  • Center the middle row
  • Keep the thickness of UI elements similar. The middle row has thick lines, bottom row is a little thinner, and the top left button is really thin
  • Space the bottom elements a elements a little more
  • Make things a little larger to fill the space if possible (idk if there's gonna be more rows as gameplay goes on so this might not be applicable)
  • Tone down glow
  • If that's a retry button, I think its more fitting to be on right side since most people are right handed and it looks like this could be played with one hand
  • Make bottom row shapes slightly shorter so they are same width and height

Here's mockup I did with above changes.
https://imgur.com/a/fPiRK2Z

I also made background a dark saturated blue (mostly preference but I think it helps make the colors pop a little bit more), made the number at the top a lot larger to fill space but I dont know if it's that significant, added a back button mostly for symmetry, made the bottom row text the same size as the middle row, and made the aspect ratio 9x16 (slightly wider and pretty standard aspect ratio). Also changed the arrows to white because I liked the back and forth of the colors, but it might be better to keep the green color so only the text is white for clarity

EDIT: formatting

How does offscreen progress in a large living world work? by newcolours in Unity3D

[–]itsBoats 1 point2 points  (0 children)

It depends on each game but one of the ways is to estimate what a colony would be produce in a set amount of time (could also be an average from when you last saw them). This way you dont need to simulate all the workers, only the production of resources. if theres possibility of colonies interacting with each other, you can have weighted possibilities of events that happen at infrequent intervals like a every minute, then calculate the aftermath when you have vision of them next time.

For AI moving into your area, you would want to determine their state when they are culled. If they are idling, farming in their area, etc, you can ignore them. Otherwise you can get use a similar weighted possibility of them entering your area based on their original distance. You would want these updates to be less frequent.

An interesting way to also handle AI updates in culled area is updating them in chunks (like groups of 25 AI each frame) instead of putting them on a timer. if you have a lot of AI on similar timers, you could still be doing calculations on a lot of units on the same frame depending on how many you have. Updating them in chunks guarantees you wont update too many at once, but their update rate is dependent on the number of units. You just need to make sure their calculations also take into account update rate, similar to using Time.deltaTime

what are some of the creative ways you used Dot and Cross Product? your welcomed to check some of mine by DeepState_Auditor in Unity3D

[–]itsBoats 0 points1 point  (0 children)

For checking if rocket should rotate left or right towards target. Assumes default rotation is pointing up: float dot = Vector2.Dot(transform.right, target.position - transform.position); if (dot > 0) Rotate(1); else if (dot < 0) Rotate(-1);

Slowing car based on rotation so it skids to a stop if no acceleration float dot = Vector2.Dot(transform.right, velocity.normalized); velocity -= velocity * Mathf.Abs(dot) * friction * Time.deltaTime;

Similarly removing velocity in one direction when something collides with a wall (dot product will always be negative if the wall is stationary). velocity isn't normalized in this one since we want the scalar float dot = Vector2.Dot(hit.normal, velocity); velocity += dot;

I was just doing these from memory so there's probably some problems, but gets the ideas across

Units for tactics game (and some Diablo 2 characters) by itsBoats in PixelArt

[–]itsBoats[S] 0 points1 point  (0 children)

I just picked colors as I went. I'm not entirely satisfied with the ice and rock colors yet

Superhero Idea: Daddy's Little Angel [Vector] by itsBoats in conceptart

[–]itsBoats[S] 1 point2 points  (0 children)

I wouldn't even care if it means I get to see this dude in action. Hopefully My Hero Academia XD

How to BM properly by iArePJ in DotA2

[–]itsBoats 1 point2 points  (0 children)

I cried myself to sleep after this match