Another attempt at my linepicking problem
Blitz3D Forums/Blitz3D Programming/Another attempt at my linepicking problem
| ||
Hey peeps, me again. I'll do my best :D What i'm currently doing: Linepicking from the centre of a sphere in the direction of the collision point, to detect the Actual location on the surface the sphere should not get past (this is the collision system in the very original ODE. Yes, i'm working with it still...) WHat I need to do: Get the same information, Faster. I'm using blitz collisions so i have got collisionx,y,z values, and i know the radius of the sphere... So, how can i get that information quicker? This is one of the reasons the Car engine isnt very efficient, theres a ton of linepicks AND collisions going on.i had pretty much sorted it but i kept getting odd results that resembled a broken suspention! Any advice on this would be great. My god, ive needed you peeps' help alot recently :D Cheers in advance, Hope I explained this one better :D |
| ||
what about decreasing the width and length of the linepick |
| ||
You'd be surprised... I'll post some code in a bit, I'm picking by less than a distance of 1...in fact, its less than .2 thinking of it, I will chack later, and post back some code. Its only a mod of ODE... |
| ||
how many picks per second? |
| ||
800-1200 picks per second. :) WHats a good value for that By the way, IM not sure on the polycount, its quite low... |
| ||
any way of getting less picks? my PC slows down after 200 |
| ||
No way at all... the cars are always on the ground, (cept for when they speed over a hill) and the wheels simply must not go through the floor... and they do. I've already improved it down from 1440, but i cant find another way... ON another note, i forgot to post my code yesterday, so here it is: n#=.5 dst#=50*n# dst2#=2*n# TranslateEntity ent\mesh,(GLOBALCOLS(c2)\nx#)*dst2,(GLOBALCOLS(c2)\ny#)*dst2,(GLOBALCOLS(c2)\nz#)*dst2 unused = LinePick( EntityX(ent\mesh,1),EntityY(ent\mesh,1),EntityZ(ent\mesh,1),(GLOBALCOLS(c2)\nx#)*-dst,(GLOBALCOLS(c2)\ny#)*-dst,(GLOBALCOLS(c2)\nz#)*-dst,.0001) This code is used to stop objects going through walls at high speeds in my code. Vorderman might recognise it as he wrote the original ODE routine... Anyway, i need to get off to work, Hope there are some techniques lying around! Cheers |