r/Unity3D – Telegram
r/Unity3D
264 subscribers
12.6K photos
15.6K videos
14 files
48K links
News about the Unity engine and project showcases from Reddit. Made possible with @reddit2telegram (@r_channels).
Download Telegram
This media is not supported in your browser
VIEW IN TELEGRAM
Universal Gravitation with 50k objects in Unity. Optimized with GPU compute shader's calculations + indirect GPU instancing

https://redd.it/1hch5rt
@r_Unity3D
This media is not supported in your browser
VIEW IN TELEGRAM
I released my first Asset about Insect Simulations (Free codes on Desc)

https://redd.it/1hcjgbu
@r_Unity3D
This media is not supported in your browser
VIEW IN TELEGRAM
New blink / talk animation and voice. Before or after voice? Sound on

https://redd.it/1hckfto
@r_Unity3D
Defender's Dynasty, From a Simple Tutorial to a Full-Fledged Game. First Game, a Journey Through Iterations, Refinements and Creativity!
https://redd.it/1hcn45o
@r_Unity3D
Media is too big
VIEW IN TELEGRAM
After 12 years of working solo on Zefyr, I'm getting close to release! If you like old school adventure games from the gamecube/ps2 era (Zelda Windwaker, BGE, Sly Cooper, ...) you might want to check out the demo on the Steam page! I used unity as a game engine, I think I started with 3.5!

https://redd.it/1hclvj0
@r_Unity3D
2d and 3d at the same time ?

Hello I'm new to making games
I'm inspired by inscryption and I got a idea for a game that changes from 2d to 3d but if the player moved in 3d or 2d their location would also change in both or if something happened in 2d , it also changes in 3d
So is it possible in unity ?

https://redd.it/1hcv2ph
@r_Unity3D
need help with 2d boost

im making a boost mechanic in 2d similar to sonic rush games. the boost functions fine but theres a bug where, if grounded, if unlockDash is false, if boosting off an edge; my gravity will be set low so i float off the platform edge but it will be set really high so i cant jump.

ive integrated a dash mechanic with the boost so if unlock dash is false, the boost works normally but if unlockdash is true, the dash plays followed by the boost


ik its alot of code but any help will be appreciated!






void Boost()
{
if (Input.GetButton("Dash") && !isBoosting && canBoost)
{
if (Grounded())
{
// Grounded Boost: Dash then Boost
StartCoroutine(DoBoost(true)); // Execute Boost after Dash
}
else if (!Grounded() && Input.GetButton("Dash"))
{
// Mid-air Boost: Dash then Boost (while holding dash button)
StartCoroutine(DoBoost(false)); // Execute Boost right after air dash
}
}
}

IEnumerator DoBoost(bool isGroundedBoost)
{
if (isGroundedBoost)
{
// Start Dash if grounded
int dir = pState.lookingRight ? 1 : -1; // Use facing direction to determine dash direction
rb.velocity = new Vector2(
dir dashSpeed, 0);
yield return new WaitForSeconds(dashTime);

// Boost after Dash ends if grounded
boostTimer = 0f; // Reset boost timer
isBoosting = true;
bool boostCompleted = false;

// Don't disable gravity when grounded
if (!Grounded()) // Ensure gravity is only set to 0 when not grounded (mid-air boost)
{
rb.gravityScale = 0f; // Disable gravity only during mid-air boost
}

while (boostTimer < boostDuration && Input.GetButton("Dash"))
{
boostTimer += Time.deltaTime; // Increment boost time
rb.velocity = new Vector2(boostSpeed
(pState.lookingRight ? 1 : -1), rb.velocity.y); // Apply boost velocity in the direction the player is facing
yield return null;
}

// If the full boost duration was used, start cooldown
if (boostTimer >= boostDuration)
{
boostCompleted = true;
}

// Reset after boost ends
EndBoost(boostCompleted);
}
else
{
// In mid-air, boost directly after dash if Dash button is held
if (Input.GetButton("Dash"))
{
isBoosting = true;
boostTimer = 0f;
bool boostCompleted = false;

// Dash before boosting in mid-air
int dir = pState.lookingRight ? 1 : -1; // Use facing direction to determine dash direction
rb.velocity = new Vector2(
dir dashSpeed, 0);
yield return new WaitForSeconds(dashTime);

// Boost continues
while (boostTimer < boostDuration && Input.GetButton("Dash"))
{
boostTimer += Time.deltaTime;
rb.velocity = new Vector2(boostSpeed
(pState.lookingRight ? 1 : -1), rb.velocity.y); // Apply boost velocity in the direction the player is facing
yield return null;
}

// If the full boost duration was used, start cooldown
if (boostTimer >= boostDuration)
{
boostCompleted = true;
}

// End boost after duration
EndBoost(boostCompleted);