Jump to content



Photo

Captive Ball


  • Please log in to reply
2 replies to this topic

#1 chepas

chepas

    t.me/horsepin

  • Members
  • PipPipPipPip
  • 1,966 posts

  • Flag: ---------

  • Favorite Pinball: BSD, Tr0n, SW:Stern

Posted 27 April 2014 - 06:57 PM

https://www.dropbox....qaptiveBall.png

 

Managed to drop the captive ball into the right place but can't be hit. I've tried debug shots but seems it's static.

        // Captive ball
        GameObject captive = Utils.CreateBall();      
        captive.name = "captiveball";
        captive.GetComponent<SphereCollider>().enabled = true;
        captive.GetComponent<Rigidbody>().isKinematic = true;
        captive.transform.position = new Vector3(-437.6534f, -55.25936f, 645.3322f);

Bump maps are the new auto-tune :BDH:
VPX - RSS Updates ---- blog.flippingflips.xyz/en/ -- Visual Pinball No.1 (2021) . Est.2000


#2 BilboX

BilboX

    Enthusiast

  • Unit3D Pinball Team
  • 433 posts
  • Location:French Polynesia

  • Flag: France

  • Favorite Pinball: Metallica, Addams Familly, Scared Stiff, White Water

Posted 28 April 2014 - 11:14 PM

You are missing this line at the end:

captive.GetComponent<Rigidbody>().isKinematic = false;

This line will tell the engine you "finished" moving it by hand and that the physical smulation can be restarted on this ball...

Tell me if this worked...


UP2


#3 chepas

chepas

    t.me/horsepin

  • Members
  • PipPipPipPip
  • 1,966 posts

  • Flag: ---------

  • Favorite Pinball: BSD, Tr0n, SW:Stern

Posted 28 April 2014 - 11:19 PM

Cool. Works as it should and moves enough after being hit.

 

Should of at least tried that line myself but wanted to keep moving on with other bits.


Bump maps are the new auto-tune :BDH:
VPX - RSS Updates ---- blog.flippingflips.xyz/en/ -- Visual Pinball No.1 (2021) . Est.2000