C
C#7mo ago
MatBanas365

Please help

Hi i am learning programming and i started to develop my own game but i am stuck for month and longer in one issue. can somebody help me out? the problem is, everytime i started tha game, my character is still going through wall, even though i have box colider on character and walls as well. thx
19 Replies
Pobiega
Pobiega7mo ago
This sounds like a case for $unity
Pobiega
Pobiega7mo ago
This is a C# discord, we can help with C# issues, but this is related to how unity works more so than the C# language itself
Buddy
Buddy7mo ago
You didn't share code $paste
MODiX
MODiX7mo ago
If your code is too long, you can post to https://paste.mod.gg/ and copy the link into chat for others to see your shared code!
Buddy
Buddy7mo ago
I assume you are using transform.position or transform.Translate to move the character. Setting the position manually will not check for collision, it will ignore all collisions and just force the position to update
MatBanas365
MatBanas365OP7mo ago
i have got more codes, give me a minute
Buddy
Buddy7mo ago
Instead use rigidbody velocity.
Buddy
Buddy7mo ago
Please use the link above
MatBanas365
MatBanas365OP7mo ago
i have got 3 separate codes for move, maze cell and maze generator okey
Buddy
Buddy7mo ago
Mobile don't display the codes If sent as file And please only paste the player code Map generation isn't of use .. yet.
MatBanas365
MatBanas365OP7mo ago
BlazeBin - csbrkcicrgpd
A tool for sharing your source code with the world!
MatBanas365
MatBanas365OP7mo ago
this is just player now i am not gonna be texting back because i am in school and after school i am going to work, sooo at the evening i am here back. thank for help
Buddy
Buddy7mo ago
Exactly as I assumed
MODiX
MODiX7mo ago
Buddy
I assume you are using transform.position or transform.Translate to move the character. Setting the position manually will not check for collision, it will ignore all collisions and just force the position to update
Quoted by
<@203166497198047232> from #Please help (click here)
React with ❌ to remove this embed.
Buddy
Buddy7mo ago
That is your problem. You should use Rigidbody to move the character You can directly set the velocity like yourRigidbody.velocity = yourVelocity; yourVelocity being the direction (and speed) of where you want to move
MatBanas365
MatBanas365OP7mo ago
I am at work right now but i am gonna be at home around 11PM so I am gonna look at it and if I understand it right everything with transform.position I have to change to this? @Buddy, Citizen of Pluto Hi
Buddy
Buddy7mo ago
Hi. Correct.
Want results from more Discord servers?
Add your server