求助,怎么实现把物体捡起来?
疯啦哈哈哈
疯啦哈哈哈 13167 11
脚本 2016-01-09 16:58
初学求问:我用的是unity自带的第一人称视角,然后往这个控制器下面放了一个空物体做子物体,比如说当我碰到一个球的时候,按鼠标摧毁这个球,然后在空物体的位置克隆这个球,再扔出去。现在可以摧毁这个球了,但是不能克隆,我想的是在空物体上加一个代码将这个空物体的坐标传送给控制器,然后控制器在这个位置上克隆新的球,或者控制器把球体的信息传递给空物体,空物体新建,但是这两个方法都没实现,求解决方法.
这是代码:控制器:

图片:5.png


球体:

图片:6.png


ps:不清楚传递球体信息的类型是什么,反正我用的object报错了。
分享:
游客
要评论请先登录 或者 注册
11条回应 只看楼主 最新
疯啦哈哈哈 学徒 2016-01-11 13:15 1楼
啊哈,是我想的太复杂了,应该是射线碰撞到物体,就把物体的位置改成子物体(empty)的位置:

先定义一个叫touchGame的gameobject,要把empty拖进去
然后在射线检测里面写:if(hit.collider.gameObject.tag=="touch"&&Input.GetKeyDown(KeyCode.E)){
 hit.collider.gameObject.transform.position=touchGame.gameObject.transform.position;
 }
但是这个时候又出错了,就是按一下E,物体能拿起来一下,然后又掉了回去,还是有问题,求解
ishare 学徒 2016-01-11 13:56 2楼
function OnTriggerEnter (other : Collider) {
Debug.Log(other.gameObject);
}
这可以接收到碰撞对象。
木鱼。 学徒 2016-01-15 13:49 3楼
疯啦哈哈哈:啊哈,是我想的太复杂了,应该是射线碰撞到物体,就把物体的位置改成子物体(empty)的位置:

先定义一个叫touchGame的gameobject,要把empty拖进去
然后在射线检测里面写:if(hit.collider.game...
回到原帖
射线是一直发射的吧,位置一直在改变;直接销毁看见的克隆一个到想要的位置
peng575908502 学徒 2016-12-15 19:58 4楼
直接进行碰撞检测,碰撞之后将该物体设置成为你人物的子物体就好了  这样就能够跟随移动,模拟“拿起”这一动作了
oanh201079 学徒 2017-04-21 22:07 5楼
cool tips
taonima 新手 2018-02-07 16:18 6楼
damage.transform.setparents(transform);
damage.transform.possition=new vectory3(0,0);
Monday12 学者 2018-06-19 09:24 7楼
20180619 junda
longchamp pas cher
gucci handbags
miu miu handbags
jack wolfskin
cleveland cavaliers jersey
kate spade outlet
ugg outlet
michael kors outlet online
air huarache
converse shoes
nike pegasus
michael kors
manolo blahnik outlet
true religion jeans
air jordan retro
bucks jerseys
coach outlet
tory burch outlet
ray ban sunglasses
oakley sunglasses
soccer jerseys
fitflops sale
michael kors outlet
kate spade outlet
ray ban sunglasses
air max 90
prada shoes
bulls jerseys
carrera sunglasses
michael kors outlet
nike factory outlet
ugg outlet
harry winston jewelry
cheap jordans
ferragamo outlet
ed hardy clothing
san antonio spurs jerseys
michael kors outlet
lacoste polo shirts
air huarache
michael kors outlet
canada goose jackets
uggs outlet
coach outlet
toms shoes
mulberry outlet
canada goose outlet
ugg boots clearance
oakley sunglasses
burberry outlet
supreme clothing
nhl jerseys
chicago blackhawks jerseys
oakley sunglasses
ugg outlet
pandora charms
burberry outlet
gentle monster sunglasses
jerseys from china
malone souliers
chloe outlet
adidas nmd
nba jerseys
coach outlet
hermes birkin
guess factory
cheap jerseys
cavaliers jerseys
supra shoes
michael kors
polo outlet
air jordan shoes
oakley sunglasses
brequet wathes
true religion jeans
manchester united jersey
jordan shoes
golden goose sneakers
adidas uk
coach outlet online
nobis outlet
canada goose outlet
kd 9
true religion outlet
ray ban sunglasses
coach outlet
tory burch outlet
polo ralph lauren
michael kors outlet
longchamp outlet
michael kors handbags
cheap jordans
merrell shoes
isabel marant outlet
canada goose outlet
coach canada
nike air max 90
polo ralph lauren
polo ralph lauren
canada goose coats
christian louboutin outlet
michael kors
bottega veneta outlet
kate spade outlet
coach handbags
cartier jewelry
kate spade outlet
nba jerseys
kings jerseys
stuart weitzman shoes
spurs jerseys
lebron james shoes
canada goose outlet
new balance shoes
oakley sunglasses wholesale
pandora charms
coach outlet
asics shoes
jeep shoes
michael kors outlet
nfl jerseys wholesale
coach outlet canada
christian louboutin outlet
hermes outlet
michael kors outlet online
michael kors outlet
cheap jordans
jimmy choo shoes
canada goose outlet
oakley sunglasses
ysl outlet
michael kors outlet
coach outlet
air jordan 4
nhl jerseys
oakley sunglasses
ugg boots
toms shoes
jordan shoes
cheap jordans
san francisco 49ers jerseys
adidas wings
cheap jordans
prada handbags
coach outlet
coach outlet online
diesel jeans
ray ban sunglasses
canada goose jackets
fitflops outlet
calvin klein jeans
michael kors handbags
pandora jewelry
saucony shoes
canada goose jackets
suns jerseys
salomon shoes
ugg boots
kate spade outlet
ralph lauren polo shirts
fitflops sale clearance
ray ban sunglasses
freshjive clothing
canada goose jackets
mulberry handbags
coach handbags
air jordan release dates
canada goose outlet
nike foamposite
bvlgari jewelry
moncler outlet
moncler jackets
moncler outlet
swarovski crystal
pacers jerseys
supreme uk
dansko shoes
air max uk
ray ban sunglasses
christian louboutin outlet
kobe bryant shoes
chrome hearts outlet
huf clothing
heat jerseys
kappa clothing
le coq sportif shoes
ugg boots
chrome hearts outlet
adidas soccer shoes
cheap jordans
ferragamo outlet
cheap jordans
van cleef & arpels jewelry
bulgari jewelry
soccer shoes
arcteryx jacket
longchamp pliage
michael kors outlet
pandora charms
michael kors outlet
fingerlings monkey
polo ralph lauren
polo outlet
fitflops
off white
michael kors outlet
kate spade outlet
michael kors outlet
ferragamo shoes
kobe shoes
nfl jersey wholesale
canada goose outlet
y3 shoes
michael kors outlet
chloe sunglassess
true religion jeans
yeezy boost
nike air max 2015
ferragamo shoes
michael kors outlet
fitflops sale
true religion jeans
longchamp outlet
balmain jeans
christian louboutin shoes
longchamp handbags
coach outlet
soccer jerseys
tods outlet
coach outlet online
ray ban sunglasses
kyrie 4
michael kors outlet
bcbg dresses
coach outlet store online
christian louboutin outlet
michael kors outlet
nike shoes
clarks shoes
pandora charms
coach outlet
moncler jackets
uggs outlet
michael kors
under armour outlet
celtics jerseys
canada goose parka
mcm outlet
fitflops shoes
air jordan 4
oakley sunglasses
polo outlet
bally shoes
michael kors outlet
tory burch outlet
brequet wathes
polo ralph lauren
oakley sunglasses
cheap mlb jerseys
kevin durant jerseys
hornets jerseys
ray ban sunglasses
true religion jeans
adidas outlet
yeezy boost 350
michael kors uk
uggs outlet
camel shoes
oakley sunglasses
pandora outlet
kevin durant shoes
ugg outlet
isabel marant shoes
ugg outlet
fitflops sale clearance
air jordan 12
hawks jerseys
adidas outlet
ferragamo outlet
76ers jerseys
christian louboutin outlet
world cup jerseys
nike shoes
true religion uk
jazz jerseys
true religion jeans
coach outlet online
ugg outlet
polo ralph lauren
gucci outlet
coach factory outlet
stephen curry shoes
michael kors outlet
dc shoes
nets jerseys
jordan shoes
kobe 9
ugg outlet
polo ralph lauren
reebok trainers
simulation shoes
gucci outlet
stussy clothing
coach outlet online
canada goose jackets
michael kors handbags
gucci outlet
mizuno running shoes
ugg boots
mont blanc pens
michael kors outlet
balenciaga sneakers
jimmy choo sunglasses
adidas nmd
nike revolution
basketball jerseys
nike air force 1
kate spade outlet
adidas trainers
pandora charms
armani exchange
ralph lauren outlet
polo ralph lauren
air max 90
timberwolves jerseys
golden state warriors jerseys
canada goose outlet
canada goose jackets
canada goose jackets
swarovski outlet
five fingers shoes
louboutin shoes
burberry outlet
louboutin pas cher
ugg boots
nike outlet
pandora
michael kors outlet
fitflops
nike store uk
hermes belt
pandora charms
ralph lauren polo
oakley sunglasses
ray ban sunglasses
christian louboutin outlet
cheap nhl jerseys
ugg outlet
mulberry handbags
canada goose jackets
coach outlet
raptors jerseys
balenciaga sneakers
gucci outlet
basketball shoes
air max 97
ugg outlet
christian louboutin outlet
oakley sunglasses
coach outlet
true religion outlet
mishka clothing
uggs outlet
nike shoes
nike blazer pas cher
ray ban sunglasses
grizzlies jerseys
cheap nfl jerseys
polo ralph lauren
longchamp solde
canada goose outlet
canada goose outlet
canada goose outlet
swarovski outlet
kate spade outlet
nike presto
air more uptempo
keen shoes
coach outlet
true religion jeans
polo ralph lauren
toms shoes
mbt shoes
polo ralph lauren
air max 2017
prada handbags
coach outlet
ugg boots
givenchy jewelry
oakley sunglasses
nike air max
tory burch outlet
fila shoes
adidas crazy
air max 90
canada goose outlet
coach outlet online
g-star jeans
pandora charms
canada goose jackets
ecco shoes
jordan shoes
mulberry handbags
air max 95
lakers jerseys
a bathing ape
trailblazers jerseys
canada goose outlet
links of london
barcelona jersey
prada outlet
moncler outlet
suicoke sandals
knicks jerseys
montblanc pens
karen millen dresses
marc jacobs outlet
audemars piguet watches
canada goose jackets
dolce and gabbana
vans shoes
denver broncos jerseys
undefeated clothing
uggs
columbia sportswear
michael kors handbags
michael kors handbags
coach outlet
kd 10 elite
oakley sunglasses wholesale
mulberry handbags
nba jerseys
ferragamo outlet
christian louboutin outlet
ray ban sunglasses
denver broncos jerseys
michael kors outlet
hermes outlet
nike outlet
christian louboutin shoes
mavericks jerseys
pandora charms
pelicans jerseys
reebok outlet store
ugg outlet
canada goose outlet
tory burch outlet
ray ban sunglasses
coach outlet
10 deep clothing
belstaff jackets
ugg outlets
pandora outlet
oakley sunglasses
prada sunglasses
minnetonka outlet
canada goose outlet
houston texans jerseys
mulberry outlet
ralph lauren polo shirts
fitflops sale clearance
canada goose outlet
pandora charms sale clearance
canada goose
air jordan shoes
pistons jerseys
coach outlet
mac makeup
nike store
pandora charms
real madrid jersey
cazal sunglasses
polo ralph lauren
coach outlet online
fred perry polo shirts
champion clothing
alexander mcqueen shoes
oakley sunglasses
longchamp handbags
magic jerseys
pandora charms
burberry outlet
baltimore ravens jerseys
kate spade outlet
michael kors outlet
oakley sunglasses
jordan shoes
swarovski outlet
true religion jeans
polo ralph lauren
lacoste soldes
rockets jerseys
visvim shoes
true religion jeans
kate spade outlet
true religion outlet
palladium boots
canada goose jackets
jordan 32
moncler outlet
polo shirts
oakley sunglasses
cheap jerseys
michael kors outlet
givenchy handbags
michael kors outlet
cheap jordans
michael kors
cheap jordans
ray ban sunglasses
fossil watches
warriors jerseys
indianapolis colts jerseys
ugg outlet
longchamp solde
michael kors outlet
jordan shoes
polo ralph lauren
oakley sunglasses
canada goose outlet
mulberry bags
wizards jerseys
ugg outlet
michael kors outlet
chopard jewelry
ralph lauren polo shirts
swarovski crystal
polo outlet
cheap mlb jerseys
air max 90
air jordan 3
uggs outlet
longchamp bags
coach outlet online
pandora jewelry
cheap football shirts
coach outlet online
birkenstock outlet
canada goose outlet
coach outlet
football shirts
uggs outlet
birkenstock sandals
canada goose outlet
air force 1
alife clothing
longchamp handbags
dior outlet
polo outlet
cheap jordans
cheap jordans
ralph lauren pas cher
ray ban sunglasses
furla handbags
kate spade outlet
michael kors outlet
coach outlet
cheap jordans
cheap jordans
james harden jerseys
dsquared2 jeans
true religion jeans
bape clothing
jordan shoes
ubiq shoes
michael kors outlet
swarovski outlet
oakley sunglasses
ferragamo outlet
coach outlet online
coach factory outlet
valentino outlet
wellensteyn jackets
coach outlet
fendi handbags
oakley sunglasses
light up shoes
nike roshe one
coach outlet
tag heuer watches
tory burch outlet
longchamp outlet
ugg outlet
ray ban sunglasses
ray ban sunglasses
canada goose jackets
pandora charms
nike store
puma outlet
lakers jerseys
canada goose outlet
kate spade outlet
longchamp handbags
ray ban sunglasses
herve leger outlet
coach outlet
kevin durant shoes
pandora jewelry
tory burch outlet
michael kors outlet
jordan shoes
tory burch outlet
canada goose jackets
thunder jerseys
nike roshe
nuggets jerseys
chelsea jersey
ray ban sunglasses
futbol baratas
mulberry bags
cheap snapbacks
clippers jerseys
harden shoes
michael kors wallets
oakley sunglasses
true religion outlet
giuseppe zanotti outlet
yeezy boost
coach factory outlet
michael kors outlet
true religion jeans
barbour jackets
ugg outlet
kjuliuolil,kj
wwwewwwe 学徒 2018-07-20 13:58 8楼
`
<H1><a href="http://www.yeezyboost350v2.org.uk" title="yeezy boost 350 v2"><strong>yeezy boost 350 v2</strong></a></H1>
<H1><a href="http://www.russellwestbrookshoes.us" title="westbrook shoes"><strong>westbrook shoes</strong></a></H1>
<H1><a href="http://www.stephencurry-shoes.us.com" title="stephen curry shoes"><strong>stephen curry shoes</strong></a></H1>
<H1><a href="http://www.louboutinshoes.uk" title="louboutin shoes"><strong>louboutin shoes</strong></a></H1>
<H1><a href="http://www.patriotsjerseys.us.com" title="patriots jerseys"><strong>patriots jerseys</strong></a></H1>
<H1><a href="http://www.kobeshoes.uk" title="kobe byrant shoes"><strong>kobe byrant shoes</strong></a></H1>
普通H1标签  
<H1><a href="http://www.nikeairforce1.us.com"><strong>nike air force 1</strong></a></H1>
<H1><a href="http://www.michaelkorshandbags.net.co"><strong>michael kors handbags</strong></a></H1>
<H1><a href="http://www.cartierbracelet.us"><strong>cartier bracelet</strong></a></H1>
<H1><a href="http://www.offwhiteclothing.us.com"><strong>off white clothing</strong></a></H1>
UBB
louboutin shoes
nike hyperdunk 2017
nike basketball shoes
adidas pure boost
A标签
<a href="http://www.adidassuperstar.us.com"><strong>adidas superstar</strong></a>
<a href="http://www.lebron-soldier11.us.com"><strong>nike lebron 11</strong></a>
<a href="http://www.nike-airmax90.uk"><strong>nike air max 90</strong></a>
<a href="http://www.adidasnmdrunner.us.com"><strong>adidas nmd</strong></a>
裸链
http://www.yeezys.us.org
http://www.yeezy-shoes.ca
http://www.yeezy-shoes.org
http://www.yeezy-shoes.org.uk
sahab20 新手 2018-08-27 14:53 9楼
Thank you a bunch for sharing this with all folks you actually recognise what you are speaking about! Bookmarked.
<a href="https://tikban.com/بلیط-چارتر-مشهد-تهران">بلیط مشهد</a>
<a href="https://tikban.com/بلیط-چارتر-مشهد-تهران">خرید بلیط هواپیما از تهران به مشهد</a>
<a href="https://tikban.com/قیمت-بلیط-هواپیما-مشهد">خرید بلیط هواپیما مشهد</a>
<a href="https://tikban.com/بلیط-ارزان-قیمت-هواپیما">بلیط ارزان قیمت هواپیما</a>
<a href="https://tikban.com/قیمت-بلیط-هواپیما-تهران-کیش">بلیط هواپیما کیش</a>
<a href="https://tikban.com/قیمت-بلیط-هواپیما-ایران-ایر">بلیط هواپیما ایران ایر</a>
<a href="https://tikban.com/قیمت-بلیط-هواپیما-تهران-کیش">بلیط کیش</a>


This was really very interesting and helpful to read. I cant wait to read more from this site.
<a href="https://tikban.com/بلیط-ارزان-قیمت-هواپیما">خرید بلیط هواپیما ارزان</a>
<a href="https://tikban.com/قیمت-بلیط-هواپیما-تهران-کیش">خرید بلیط هواپیما کیش</a>
<a href="https://tikban.com/">بلیط هواپیما آنلاین</a>
<a href="https://train.tikban.com/">خرید بلیط</a>
<a href="https://hotel.tikban.com/">رزرو هتل</a>
<a href="https://tikban.com/بلیط-هواپیما-استانبول">بلیط هواپیما استانبول</a>
<a href="https://tikban.com/قیمت-بلیط-هواپیما-ایران-ایر">خرید بلیط هواپیما ایران ایر</a>
<a href="https://tikban.com/بلیط-هواپیما-تهران-به-شیراز">خرید بلیط هواپیما از تهران به شیراز</a>
<a href="https://tikban.com/قیمت-بلیط-هواپیما-تهران-اصفهان">خرید بلیط هواپیما از تهران به اصفهان</a>
<a href="https://tikban.com/بلیط-هواپیما-تهران-به-تبریز">خرید بلیط هواپیما از تهران به تبریز</a>
1 2
返回顶部