ambiera logo

Ambiera Forum

Discussions, Help and Support.

folder icon Ambiera Forum > CopperCube > Help with CopperCube
forum topic indicator A mowing system
person icon
spicymilk
Registered User
Quote
2024-04-09 04:39:43

Could anybody help me with a system for the grass so that once the mower has passed over the blades of grass they get smaller/ disappear

I had tried to make a system like this a while ago but failed

thanks

person icon
serge
Registered User
Quote
2024-04-09 05:53:21

i hope this help you...

https://youtu.be/0CXZ8KPt5KM?si=...

person icon
spicymilk
Registered User
Quote
2024-04-09 17:28:38

I appreciate it, but I was thinking more like just if the mower passes over the grass the grass automatically would disappear or do whatever action I set

thanks

person icon
serge
Registered User
Quote
2024-04-09 20:48:28

Same concept but use SM car controller for mowing machine and add a proximity sensor on the grass. You can add variables on the grass to decrease once travel over it.

person icon
spicymilk
Registered User
Quote
2024-04-09 22:43:49

yeah, thanks for the suggestion, I've tried that already and I can't seem to get the grass to go it will sometimes but other times it won't

person icon
o139
Registered User
Quote
2024-04-10 11:09:51

I have a solution for this.

to use this script put it on the grass node each 1 ms, execute javasscipt

and the grass will delete when player close

note: you will have to change the player1 name to your lawmover name or player


// made by o139
// free to use and modify

dragon = ccbGetCurrentNode();
pos1 = ccbGetSceneNodeProperty(dragon, "Position");

player = ccbGetSceneNodeFromName("player1");
pos2= ccbGetSceneNodeProperty(player, "Position");

distance = pos1.substract(pos2).getLength();

if(distance<=30){
ccbRemoveSceneNode(dragon);
}


person icon
Guest
Guest
Quote
2024-04-10 18:28:23

You should avoid looping through large amounts of scene nodes unless you want to kill your framerate. It'd be better to put this on something like an On Proximity behavior because then you are only checking the grass inside the proximity.


Create reply:










 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


icon_holyicon_cryicon_devilicon_lookicon_grinicon_kissicon_monkeyicon_hmpf
icon_sadicon_happyicon_smileicon_uhicon_blink   






Copyright© Ambiera e.U. all rights reserved.
Contact | Imprint | Products | Privacy Policy | Terms and Conditions |