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
This sounds like a case for $unity
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
You didn't share code
$paste
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!
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
i have got more codes, give me a minute
Instead use rigidbody velocity.
Please use the link above
i have got 3 separate codes for move, maze cell and maze generator
okey
Mobile don't display the codes
If sent as file
And please only paste the player code
Map generation isn't of use .. yet.
BlazeBin - csbrkcicrgpd
A tool for sharing your source code with the world!
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
Exactly as I assumed
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.
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 moveI 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
Hi. Correct.