Author Topic: Bricks sometimes not colliding properly with players/vehicles?  (Read 1056 times)

I've noticed that sometimes when I create bricks through script (making fxDTSBrick objects), they don't collide properly with players and vehicles.

They both just choppily move through them.

Raycasts also ignore them when this happens.


Any ideas of why this could be? I've run into it multiple times, and I'd like to know a solution.

Code: [Select]
%brick = new fxDtsBrick()
{
     isPlanted = 1;
     datablock = brick1x1data;
};
%brick.plant();
%brick.setTrusted(1);

this works for me when I had this problem

either you didn't do .plant(), isPlanted =1, or something.

you may not want to do .setTrusted. Only use it when you create a brickgroup, add the brick to it, and then do that.

if this doesn't work just look at truce's autobridge script.
« Last Edit: April 13, 2012, 09:10:58 PM by computermix »

I don't recall a time I've ever not done either of those.

I don't recall a time I've ever not done either of those.

Quote
if this doesn't work just look at truce's autobridge script.

go on steam and ill fix your bad code

go on steam and ill fix your bad code
not sure if it's a problem with bad code. i don't do anything out-of-the-ordinary.

it may be connected to placing too many bricks in a small time span, but if that were the case, the problem would come up in a lot of other things.


nothing in truce's autobridge has anything that helps me, sorry.

not sure if it's a problem with bad code. i don't do anything out-of-the-ordinary.

it may be connected to placing too many bricks in a small time span, but if that were the case, the problem would come up in a lot of other things.
hey
go on steam and i bet you i can spot the error
BET SAYS I CAN

hey
go on steam and i bet you i can spot the error
BET SAYS I CAN

actually i just went back and made an edit to a code that did this

i had bricks being planted on regular intervals using schedules

i made the schedule always be 0 for planting, and the problem seems to be gone

odd.

I've noticed that sometimes when I create bricks through script (making fxDTSBrick objects), they don't collide properly with players and vehicles.

They both just choppily move through them.

Raycasts also ignore them when this happens.


Any ideas of why this could be? I've run into it multiple times, and I'd like to know a solution.
This occurs when you don't do %brick.plant, there is no doubt in my mind that it could be anything else.
The exact phenomena that you described occurs when you do this. I extremely doubt that it is caused because too many bricks were planted at once. I think you should post an excerpt of your code, containing the schedule you mentioned, because you may have tried to do %brick.plant before %brick = new fxDTSBrick

This occurs when you don't do %brick.plant, there is no doubt in my mind that it could be anything else.
The exact phenomena that you described occurs when you do this. I extremely doubt that it is caused because too many bricks were planted at once. I think you should post an excerpt of your code, containing the schedule you mentioned, because you may have tried to do %brick.plant before %brick = new fxDTSBrick
Odd. There shouldn't be any circumstances under which plant isn't called.
Not sure what could have caused that to happen, but I should look into figuring it out.

I remember I had a problem like this, I believe it actually has something to do with setting the angleId incorrectly.

The only case where this can happen is if you create a brick with the isPlanted member field set to a positive value and you don't call the plant method. When the brick is ghosted to a client, the client believes the brick should be rendered as solid due to isPlanted, while it in reality is still a ghost brick.

The buggy “walking through it“ is caused by the client believing it should walk on top of it but gets teleported back down by server-sided movement correction.
« Last Edit: April 16, 2012, 03:51:49 AM by Port »

The only case where this can happen is if you create a brick with the isPlanted member field set to a positive value and you don't call the plant method. When the brick is ghosted to a client, the client believes the brick should be rendered as solid due to isPlanted, while it in reality is still a ghost brick.

The buggy “walking through it“ is caused by the client believing it should walk on top of it but gets teleported back down by server-sided movement correction.

alright then. thanks for clearing that up.