This site requires JavaScript, please enable it in your browser!
Greenfoot back
Roshan123
Roshan123 wrote ...

2021/8/31

Help in need!

Roshan123 Roshan123

2021/8/31

#
Plz go through this link and then download it...... Open the world named intro..... Set the world size to (800, 600,1)......click duo..... Observe BlueBot and then click on solo...... Again observe Bluebot...... I created a mechanism in which the 'Blue bot' only moves towards the crate in solo and not it duo..... Well, its not the problem, the main problem is that i want to keep that mechanism only in solo but the ' blue bot ' after, aftr touching the crate, it stops moving Plz rectify my mistake and just tell me what changes do i need to do?
Roshan123 Roshan123

2021/8/31

#
Plz reply anything after downloading it
danpost danpost

2021/8/31

#
Roshan123 wrote...
Plz reply anything after downloading it
Got it.
danpost danpost

2021/8/31

#
Roshan123 wrote...
i want to keep that mechanism only in solo but the ' blue bot ' after, aftr touching the crate, it stops moving
Apparently, your raycasting mechanism to test the tank "seeing" a crate only becomes true if the crate is horizontally or vertically in line with the tank. That is, if you add the 3rd crate at the same x value as the 2nd crate (lower of initial 2 crates), the tank will see it.
Roshan123 Roshan123

2021/8/31

#
Is it possible to make it move towards the required direction without any stoppage of bot? I mean how will i fix it?
Roshan123 Roshan123

2021/9/1

#
Apparently, your raycasting mechanism to test the tank "seeing" a crate only becomes true if the crate is horizontally or vertically in line with the tank. That is, if you add the 3rd crate at the same x value as the 2nd crate (lower of initial 2 crates), the tank will see it.
Sorry, unfortunately I m not able to understand what u mean.... Do u mean that when i will add 3rd crate, i will have to add it in a horizontal or vertical line with bot? Ex:- bot location is (450, 400).....3rd crate location should be (450, 400) inorder to make it move towards the 3rd crate ? M i correct?
Roshan123 Roshan123

2021/9/1

#
Plz click this link Its the previous version of it and solo works perfectly. ... The day when i added the "rotation mechanism" in solo mode, it started acting wierldly(after downloading it, i think u may understand what i mean to say about the "rotation mechanism")
danpost danpost

2021/9/1

#
Roshan123 wrote...
Ex:- bot location is (450, 400).....3rd crate location should be (450, 400) inorder to make it move towards the 3rd crate ? M i correct?
Sort of correct. if bot is at (450, 400), then crate should be added at (x, 400) or (450, y) for bot to "see" it. The problem appears to be within the raycasting algorithms, because TouchCrate method passes first (if) test conditions when the 3rd crate is added into the world, but fails with the next set of conditions which test for "colliding" obstacles. However, if the crate is in line, horizontally or vertically (pause and move 3rd crate in line to confirm), the bot will go to it rather than repel from it.
Roshan123 Roshan123

2021/9/1

#
Plz tell me what change do i need to do in the algorithm of RayCasting´╗┐
Roshan123 Roshan123

2021/9/1

#
danpost wrote...
The problem appears to be within the raycasting algorithms,
But how?...... I see that its working perfectly in previous version.... I don't think their is any problem in RayCasting´╗┐ algorithm.....after adding the "rotation mechanism", the problem was created. Their is hardly a small change in TouchCrate method i.e. move(speed) (in previous version, it was move(3) ) ...... I think the problem is in moveAround method. It is the place where their is a vast amount of chages i did. I m 100% sure that RayCasting´╗┐ algorithm is the problem(since u r telling) but the thing which troubles me is that the previous version is working perfectly
danpost danpost

2021/9/1

#
danpost wrote...
The problem appears to be within the raycasting algorithms
"appears" means NOT 100% sure. "raycasting algorithms" means codes dealing with ray casting (could be in RayCasting class or there in TouchCrate method -- maybe just state of bot or input into raycasting constructors or methods). I have not delved into it that far yet.
Roshan123 wrote...
after adding the "rotation mechanism", the problem was created.
Very possible that moveAround method has something to do with problem. It will be something I will consider when I do look into it.
Roshan123 Roshan123

2021/9/5

#
Thanks for cooperation! Finally it's fixed
You need to login to post a reply.