C
C#2mo 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
Pobiega2mo ago
This sounds like a case for $unity
Pobiega
Pobiega2mo 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
Buddy2mo ago
You didn't share code $paste
MODiX
MODiX2mo 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
Buddy2mo 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
MatBanas3652mo ago
i have got more codes, give me a minute
Buddy
Buddy2mo ago
Instead use rigidbody velocity.
Buddy
Buddy2mo ago
Please use the link above
MatBanas365
MatBanas3652mo ago
i have got 3 separate codes for move, maze cell and maze generator okey
Buddy
Buddy2mo 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
MatBanas3652mo ago
BlazeBin - csbrkcicrgpd
A tool for sharing your source code with the world!
MatBanas365
MatBanas3652mo 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
Buddy2mo ago
Exactly as I assumed
MODiX
MODiX2mo 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
Buddy2mo 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
MatBanas3652mo 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
Buddy2mo ago
Hi. Correct.